NginxL opened a new pull request, #20471: URL: https://github.com/apache/pinot/pull/20471
## Summary Normalize decimal values whose type uses Pinot's default scale before converting them to the internal `BIG_DECIMAL` literal representation. Trailing fractional zeros are removed, while a negative scale from `stripTrailingZeros()` is clamped to zero so integer-valued literals do not switch to scientific notation. Explicit decimal scales, such as `DECIMAL(10, 2)`, are left unchanged. This is the narrower serialization-side option described in #20412; the default precision/scale used by decimal arithmetic is not changed. ## Tests Added `RexExpressionUtilsTest.testDefaultScaleDecimalLiteralNormalization` for: - `1.5` padded to the default scale; - integer-valued `1000` padded to the default scale; - an explicit `DECIMAL(10, 2)` value retaining scale 2. Local checks: `git diff --check` and diff review. Not run: the TestNG planner test or Maven build, because no Java runtime is installed locally and the task prohibits downloading a JDK or dependencies. CI results will be recorded when available. ## AI disclosure AI assistance was used to inspect the planner conversion path and prepare this patch. The change and its scale-preservation behavior were reviewed; the commit includes DCO sign-off. Refs #20412. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
