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

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: #66614
   
   Problem Summary:
   
   Root cause: expression constness does not guarantee a physical 
`ColumnConst`. Cached constant expressions can return either a const wrapper or 
a single-row data column, while scan consumers sometimes cast the result 
directly to `ColumnConst`.
   
   Store an owned single-row data column in `ConstantExprResult`, unwrap 
`ColumnConst` without copying, and expose read-only accessors. Migrate scan, 
scalar-function, and ANN consumers, and recreate `ColumnConst` when 
broadcasting the cached value. Preserve current function initialization and 
NULL handling.
   
   ### Release note
   
   Handle constant expressions that return ordinary single-row columns 
consistently in scan predicate processing.
   
   ### Check List (For Author)
   
   - Test:
       - ASAN BE UT build passed. Ran 276 tests across 16 affected suites: 275 
passed and the existing `MathFunctionTest.random_test` was skipped. Coverage 
includes zero-copy normalization, nullable values and ownership, arrays with 
nested NULLs, invalid multi-row input, broadcasting, scan predicates, function 
constant arguments, and ANN extraction.
       - clang-format 16, `git diff --check`, and BE build hygiene checks 
passed.
       - clang-tidy checked all 43 modified C++ files. New diagnostics were 
fixed and rechecked; existing complexity diagnostics remain on unchanged lines 
in column and LIKE tests.
   - Behavior changed: Yes. Scan consumers accept cached single-row constants 
regardless of their original physical representation; malformed multi-row cache 
inputs fail at construction.
   - Does this need documentation: No. No SQL syntax, configuration, or 
serialization changes.
   
   ### 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