-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: zero decimal bug #5531
fix: zero decimal bug #5531
Conversation
It looks like @nae701 hasn't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here. Once you've signed reply with Appreciation of efforts, clabot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @nae701 - crushing it :D left mostly minor comments
ksqldb-common/src/main/java/io/confluent/ksql/util/DecimalUtil.java
Outdated
Show resolved
Hide resolved
ksqldb-functional-tests/src/test/resources/rest-query-validation-tests/insert-values.json
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @nae701
Description
Fixes issue #5282, where there was a bug that would not allow the insertion of valid decimals if they were equal to 0. This was due to an edge case in how BigDecimal calculates precision for zero decimal values. This patch adds a condition to check for zero decimal values and calculates their precision correctly.
Testing done
A unit test checking if the server allows the insertion of valid zero decimals was added to the rest-query-validation-tests folder.
Reviewer checklist