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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: #68332
   
   Problem Summary:
   
   Debug NULL-payload injection exposed query failures in `format_round`, array 
construction, and mixed TIMESTAMP_NS/TIMESTAMPTZ comparisons. Root cause: these 
functions consumed the arbitrary nested values of NULL rows and performed range 
validation before NULL semantics were applied.
   
   Enable the existing NULL-payload default replacement for `format_round`. For 
`array_with_constant` and `array_repeat`, check the length null map before 
reading the payload, preserving the existing empty-array result for NULL 
lengths. For mixed temporal comparisons, compare CCTZ local civil fields 
directly without rejecting NULL payloads or copying nullable input columns; 
retain signed years across date boundaries and nanosecond comparison precision.
   
   This PR contains only the three function fixes, based on master. It does not 
include the debug injection changes from #68332.
   
   ### Release note
   
   Fix query errors caused by arbitrary NULL-row payloads in formatting, array 
construction, and mixed temporal comparisons.
   
   ### Check List (For Author)
   
   - Test
       - [x] Regression test
       - [ ] Unit Test
       - [x] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
   
     Before migration to master, the identical patch was validated on the 
NULL-payload injection branch: ASAN BE build and changed-line clang-tidy 
passed. Six suites passed: `test_format_round_decimal`, 
`test_format_round_decimal256`, `fix_array_type_and_lambda_func`, 
`test_timestamp_ns_mixed_datetime_expressions`, 
`test_array_functions_array_with_const`, and `nereids_scalar_fn_Array`. 
Supplemental SQL checked mixed temporal `nullif`, NULL-safe equality, NULL 
inputs, and empty arrays for NULL lengths. `test_pythonudf_module_advanced` was 
attempted but blocked by disabled Python UDF support. No BE unit tests were 
run. After migration, clang-format 16, header hygiene, and `git diff --check` 
passed; the master-based branch was not rebuilt.
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. NULL-row payloads no longer trigger these validation errors; 
mixed temporal comparisons can compare local civil dates outside the DATETIMEV2 
range.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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