github-actions[bot] commented on code in PR #66423:
URL: https://github.com/apache/doris/pull/66423#discussion_r3717338481


##########
be/src/format_v2/file_reader.h:
##########
@@ -79,6 +80,9 @@ struct FileScanRequest {
     std::map<LocalColumnId, LocalIndex> local_positions;
     // Row-level filters converted to file-local expressions from table-level 
predicates.
     VExprContextSPtrs conjuncts;
+    // Metadata pruning may use only this prefix. A later predicate must not 
jump over an earlier
+    // non-deterministic or error-preserving conjunct in the original 
row-level order.
+    size_t metadata_pruning_safe_conjunct_count = 
std::numeric_limits<size_t>::max();

Review Comment:
   [P1] Apply this safe prefix to ORC SARG pruning too
   
   This request-wide contract is now honored by Parquet, but 
`OrcReader::_init_search_argument_from_local_filters()` still compiles every 
localized conjunct. For `[assert_true(x <> 0, 'bad'), y = 7]`, this count is 
zero; the ORC compiler drops the unsupported `assert_true` yet emits `y = 7`, 
so a stripe containing `(x=0, y=1)` can be rejected before 
`_execute_conjuncts()` raises the required error. Please bound ORC SARG 
construction by `min(metadata_pruning_safe_conjunct_count, conjuncts.size())` 
as well, and add an ORC regression with an earlier throwing predicate and later 
SARG-negative equality.



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