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
@jdegoes
Copy link
Member

jdegoes commented Jun 8, 2024

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

@abhishek818
Copy link
Contributor Author

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

@jdegoes, I have added the test.

@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