github-actions[bot] commented on code in PR #65369:
URL: https://github.com/apache/doris/pull/65369#discussion_r3552570204
##########
be/src/format_v2/parquet/parquet_scan.cpp:
##########
@@ -597,42 +786,517 @@ Status
ParquetScanScheduler::skip_current_row_group_rows(int64_t rows) {
return Status::OK();
}
+namespace {
+
+struct PredicateConjunctSchedule {
+ std::map<size_t, VExprContextSPtrs> single_column_conjuncts;
+ VExprContextSPtrs remaining_conjuncts;
+};
+
+PredicateConjunctSchedule build_predicate_conjunct_schedule(
+ const format::FileScanRequest& request) {
+ std::unordered_set<size_t> predicate_block_positions;
+ predicate_block_positions.reserve(request.predicate_columns.size());
+ for (const auto& col : request.predicate_columns) {
+ const auto position_it = request.local_positions.find(col.column_id());
+ DORIS_CHECK(position_it != request.local_positions.end());
+ predicate_block_positions.insert(position_it->second.value());
+ }
+
+ PredicateConjunctSchedule schedule;
+ for (const auto& conjunct : request.conjuncts) {
+ DORIS_CHECK(conjunct != nullptr);
+ DORIS_CHECK(conjunct->root() != nullptr);
+ if (!conjunct->root()->is_safe_to_execute_on_selected_rows()) {
Review Comment:
The new safety hook still leaves strict `CAST` predicates on the
selected-row path. `VCastExpr` inherits the base
`is_safe_to_execute_on_selected_rows()` implementation, which only checks
determinism/children, but strict casts can return errors through
`_function->execute()`. With `enable_strict_cast=true`, a predicate like `a > 0
AND CAST(b AS INT) > 0` can run `a > 0` first, shrink `selected_rows`, then
read/evaluate `b` only for survivors; an invalid `b` value on a row rejected by
`a` no longer fails the query as it did when `execute_batch_filters()`
evaluated every conjunct over `batch_rows`. Please keep casts that can raise
under strict mode off the round-by-round schedule, or make this schedule opt in
only for expression nodes proven not to suppress per-row errors.
--
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]