Use string to represent BigDecimal response#11716
Merged
Jackie-Jiang merged 1 commit intoapache:masterfrom Oct 2, 2023
Merged
Conversation
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #11716 +/- ##
============================================
+ Coverage 63.08% 63.09% +0.01%
- Complexity 1117 1118 +1
============================================
Files 2342 2342
Lines 125797 125803 +6
Branches 19336 19336
============================================
+ Hits 79358 79379 +21
+ Misses 40785 40775 -10
+ Partials 5654 5649 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 15 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
b063fa6 to
b706b09
Compare
b706b09 to
02f1dc4
Compare
Contributor
Author
|
Refactored |
xiangfu0
approved these changes
Oct 1, 2023
walterddr
approved these changes
Oct 2, 2023
| } | ||
| } | ||
|
|
||
| protected static void sortRows(List<Object[]> rows) { |
Contributor
There was a problem hiding this comment.
we might need to expose sortRows and typeCompatibleFuzzyCompare to integration test b/c some tests are failing b/c of the ordering doesn't match between H2 and Pinot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is best practice to store
BigDecimalas string in JSON to prevent losing precision.Currently we directly serialize
BigDecimalinto number (without quote) in the query response, butJsonAsyncHttpPinotClientTransportwill parse it into double and lose precision. Instead of fixing the client, fixing theBigDecimalJSON storage is the recommended solution since JSON number is not designed to preserve precision, and a lot of clients might run into the same problem.Incompatible
In the JSON response,
BigDecimalnumbers will be stored as string (with double quotes) instead of number (no double quotes)