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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: json_contains compared JSONB numeric values by their stored 
binary categories. As a result, semantically equal numbers such as integer 1 
and floating-point 1.0, or decimals with different scales, were not treated as 
contained. This changes JsonbValue::contains to compare integer, 
floating-point, and decimal JSONB values by numeric value, while keeping exact 
integer and decimal comparisons to avoid precision-related false matches.
   
   ### Release note
   
   Fix json_contains to match semantically equal JSON numeric values across 
numeric storage categories.
   
   ### Check List (For Author)
   
   - Test:
       - Build: ./build.sh --be --fe
       - Unit Test: ./run-be-ut.sh --run 
--filter=JsonbDocumentTest.contains_numeric_equality
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-29000.groovy --run -d 
query_p0/sql_functions/json_functions -s test_json_contains_numeric_equality 
-forceGenOut
       - Regression test: ./run-regression-test.sh --conf 
output/local-regression/regression-conf-29000.groovy --run -d 
query_p0/sql_functions/json_functions -s test_json_contains_numeric_equality
       - Style: build-support/check-format.sh
       - Style: git diff --check
       - Static analysis: build-support/run-clang-tidy.sh --build-dir 
be/build_Release (attempted; failed on pre-existing header/system include 
diagnostics unrelated to the changed lines)
   - Behavior changed: Yes (json_contains now treats semantically equal JSON 
numeric values across integer, floating-point, and decimal JSONB 
representations as contained)
   - 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