Abhisheklearn12 commented on code in PR #25771:
URL: https://github.com/apache/datafusion/pull/25771#discussion_r4167374983


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -1426,6 +1397,135 @@ fn pre_selection_scatter(
     Ok(ColumnarValue::Array(Arc::new(boolean_result)))
 }
 
+/// Selects undecided rows when some are false, at most
+/// [`PRE_SELECTION_THRESHOLD`] of the original batch remain, and evaluating
+/// `conjunct` on all rows is not cheap and infallible.
+fn rows_to_filter_before(
+    conjunct: &Arc<dyn PhysicalExpr>,
+    result: &ColumnarValue,
+    schema: &Schema,
+    num_rows: usize,
+) -> Option<BooleanArray> {
+    let ColumnarValue::Array(array) = result else {
+        return None;
+    };
+    let undecided = not_false(array.as_boolean());
+    let undecided_count = undecided.true_count();
+    // Classify last: it walks the whole conjunct.

Review Comment:
   @jayzhan211 thanks for reproducing it and for the approval! Filed #25976 to 
explore this :)



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