Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the codec for big decimal (#663) #687

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

abhishek818
Copy link
Contributor

@abhishek818 abhishek818 commented Jun 8, 2024

Refer:

import java.math.{BigDecimal => JBigDecimal, BigInteger
 
implicit val javaBigDecimal: BsonCodec[JBigDecimal] =
   BsonCodec(BsonEncoder.javaBigDecimal, BsonDecoder.java

Code Link

/claim #663
Closes #663

@abhishek818 abhishek818 requested a review from a team as a code owner June 8, 2024 03:45
@CLAassistant
Copy link

CLAassistant commented Jun 8, 2024

CLA assistant check
All committers have signed the CLA.

@abhishek818 abhishek818 changed the title update the big decimal codec (#663) update the codec for big decimal (#663) Jun 8, 2024
refer the codec defintion in zio-bson repo :
zio/zio-bson/src/main/scala/zio/bson/BsonCodec.scala#L80
@abhishek818 abhishek818 force-pushed the big_decimal_encode_fix branch from f6949c2 to a281517 Compare June 8, 2024 05:33
@jdegoes
Copy link
Member

jdegoes commented Jun 8, 2024

Looks great, please add a test that fails without the change! 🙏

@abhishek818 abhishek818 force-pushed the big_decimal_encode_fix branch from f892444 to 6fff70a Compare June 12, 2024 09:59
@abhishek818
Copy link
Contributor Author

Looks great, please add a test that fails without the change! 🙏

@jdegoes, I have added the test.

@abhishek818 abhishek818 force-pushed the big_decimal_encode_fix branch from 6fff70a to 1d375d9 Compare June 12, 2024 10:27
@jdegoes jdegoes merged commit 3feff56 into zio:main Jun 12, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Class java.math.BigDecimal cannot be cast to class scala.math.BigDecimal in schema-bson
3 participants