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

   ### What problem does this PR solve?
   
   Predicate-only dictionary filtering currently expands definition levels and 
row selection into `ColumnSelectVector`, then scans that row-oriented state 
again to rebuild physical selection ranges and the selected NULL layout. 
Fragmented nullable filters spend significant CPU in these two planning passes 
before dictionary IDs are decoded.
   
   ### What is changed?
   
   - Build physical dictionary selection ranges, selected NULL layout, and the 
filtered-row count directly while merging definition-level runs with the input 
filter.
   - Pass the prepared plan into dictionary-index filtering instead of 
expanding and rescanning `ColumnSelectVector`.
   - Use a bounded run-search fast path for no-NULL clustered filters, then 
switch to one linear scan after 32 runs.
   - Keep small batches, dense nullable inputs, and sparse clustered nullable 
inputs on the existing planner.
   - Add a self-validating 200-case dictionary-selection benchmark matrix.
   
   This PR does not change predicate decomposition, supported data types, 
decode strategy, or merge-read behavior. It is stacked on #66504.
   
   ### Performance
   
   Release build, 65,536 rows, CPU-pinned A-B-B-A comparison with 10 
repetitions. Lower is better.
   
   | Scenario | Existing planner | Fused planner | Change |
   |---|---:|---:|---:|
   | Q88-like: 10% selected, no NULL, clustered | 54,999 ns | 1,502 ns | 
-97.27% |
   | Q9-like: 10% selected, 1% NULL, alternating | 110,135 ns | 83,483 ns | 
-24.20% |
   
   Dense nullable and sparse clustered nullable negative-control shapes are 
routed to the identical existing planner.
   
   ### Validation
   
   - 31 targeted ASAN Parquet dictionary and nullable-selection tests passed.
   - All 200 dictionary-selection scenarios completed and self-validated 
identical physical ranges, selected NULL layout, and filtered-row counts.
   - All affected C/C++ files pass clang-format 16.
   


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