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

Decimals in JSON subscriptions of Avro topics are invalid #1808

Open
moscicky opened this issue Dec 22, 2023 · 4 comments
Open

Decimals in JSON subscriptions of Avro topics are invalid #1808

moscicky opened this issue Dec 22, 2023 · 4 comments

Comments

@moscicky
Copy link
Collaborator

Test that reproduces the bug: b9773ce

org.opentest4j.AssertionFailedError: 
expected: "1.20"
 but was: "x"
@MateuszDobrowolski
Copy link
Collaborator

Can i take care of it? : )

@szczygiel-m
Copy link
Contributor

Hi, sure 😄 in case of any questions/problems feel free to ask

@MateuszDobrowolski
Copy link
Collaborator

@szczygiel-m I have prepared the proposition of the fix. Could I ask for permission to create a draft PR?

@MateuszDobrowolski
Copy link
Collaborator

Proposal: During AVRO-to-JSON conversion, we transform messages with the logical decimal type into a BigDecimal and then into a String. This ensures that subscription consumers receive the decimal value itself rather than the byte buffer contents. This conversion does not apply to AVRO-to-JSON conversion for previews of messages published to the topic.
#1920

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants