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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary: Nullable TopN comparisons can return a `ColumnConst` that 
wraps a `ColumnNullable` result, especially when an input batch is entirely 
NULL. The previous normalization only handled a top-level `ColumnNullable`, so 
the constant nullable result could reach filter execution without converting 
SQL NULL into the NULLS FIRST or NULLS LAST filter decision.
   
   This change recursively normalizes constant wrappers, collapses nullable 
Boolean results according to the TopN null ordering, preserves the constant 
shape, and aligns the unit-test expression metadata with production 
nullability. The new unit test covers both NULLS FIRST and NULLS LAST through 
`execute_column` and `execute_filter`.
   
   ### Release note
   
   Fix nullable TopN runtime predicate filtering for constant NULL comparison 
results.
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - `GLIBC_COMPATIBILITY=OFF ./run-be-ut.sh -j 48 --run 
--filter=RuntimePredicateTest.*`
       - `build-support/run-clang-tidy.sh --base apache/master --build-dir 
be/ut_build_ASAN`
   - Behavior changed: Yes, constant nullable TopN predicate results now follow 
NULLS FIRST/LAST semantics
   - 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