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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Problem Summary:
   
   `SUM0` rejected JSON arguments in `checkLegalityBeforeTypeCoercion` before 
function signature resolution. This differed from `SUM` and `AVG`, which allow 
explicitly castable JSON numeric values to be converted to `DOUBLE` during 
normal type coercion.
   
   This change removes the obsolete `SUM0` pre-coercion gate and leaves 
validation to the existing signature resolver. Supported JSON values are 
coerced consistently with `SUM`, while unsupported types such as `BITMAP` 
remain rejected. Regression coverage includes ordinary and DISTINCT JSON 
aggregation plus the zero result for empty input.
   
   ### Release note
   
   Allow `SUM0` to aggregate numeric values extracted from JSON, consistent 
with `SUM` and `AVG`.
   
   ### Check List (For Author)
   
   - Test:
       - Unit Test: `TypeCoercionUtilsTest` and `GetDataTypeTest` (43 tests 
passed)
       - Regression test: `test_json_type_cast` passed with an ASAN FE/BE build
   - Behavior changed: Yes. `SUM0` now applies normal explicit type coercion 
consistently with `SUM` and `AVG`.
   - 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