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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: DecimalV2 vectorized comparisons converted `DecimalV2Value` 
through integer casts before applying equality and range operators. The cast 
drops the fractional part, so values such as `5.5555` could compare equal to 
`5.0` and make DecimalV2 predicates return incorrect rows.
   
   This PR compares DecimalV2 by its full scaled value. It also keeps DecimalV2 
slot-vs-literal predicates uncast on the slot side during type coercion so 
simple delete predicates can still be pushed to storage.
   
   ### Release note
   
   Fix incorrect DecimalV2 comparison results when fractional parts differ.
   
   ### Check List (For Author)
   
   - Test:
       - Unit Test: `./run-be-ut.sh --run --filter=VAccurateComparison.*`
       - Unit Test: `./run-fe-ut.sh --run 
org.apache.doris.nereids.util.TypeCoercionUtilsTest`
       - Regression test: `doris-local-regression --network 10.26.20.3/24 run 
-d datatype_p0/decimalv2 -s test_decimalv2_common`
       - Build: `BUILD_TYPE=ASAN doris-local-regression --network 10.26.20.3/24 
build`
       - Format: `build-support/clang-format.sh 
be/src/vec/core/accurate_comparison.h be/src/vec/core/decimal_comparison.h 
be/test/vec/core/accurate_comparison_test.cpp`, 
`build-support/check-format.sh`, `git diff --check`
   - Behavior changed: Yes. DecimalV2 comparisons now consider fractional 
digits correctly.
   - 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