mrhhsg opened a new pull request, #63430:
URL: https://github.com/apache/doris/pull/63430

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: LINEAR_HISTOGRAM used raw floating-point arithmetic both 
when assigning values to bucket indexes and when emitting bucket boundaries. 
Decimal intervals such as `0.1` could therefore place a value exactly on a 
decimal boundary into the previous bucket and expose artifacts such as 
`0.30000000000000004` in the JSON result. This patch normalizes bucket indexes 
that are within floating-point tolerance of an integer boundary and rounds 
emitted boundaries only when the interval and offset have an inferable decimal 
scale, preserving the previous behavior for intervals that cannot be 
represented as a bounded decimal scale.
   
   ### Release note
   
   Fix LINEAR_HISTOGRAM JSON output for decimal bucket boundaries.
   
   ### Check List (For Author)
   
   - Test:
       - Unit Test: `./run-be-ut.sh --run --filter=AggLinearHistogramTest.*`
       - Regression test: `./run-regression-test.sh --conf 
output/local-regression/regression-conf-46001.groovy --run -d 
feature_review_repro/agg_function -s AGG-HIST-001`
       - Format check: `build-support/check-format.sh`
       - Static analysis: `build-support/run-clang-tidy.sh --build-dir 
be/ut_build_ASAN` attempted, but clang-tidy could not analyze the changed files 
in this local environment because the toolchain reported missing `stddef.h` and 
a pre-existing unmatched `NOLINTEND` in `be/src/core/types.h`.
   - Behavior changed: Yes. Decimal bucket boundaries no longer expose 
floating-point artifacts and boundary values are assigned to the expected 
bucket.
   - Does this need documentation: No
   


-- 
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]

Reply via email to