EmilyMatt commented on code in PR #27302:
URL: https://github.com/apache/datafusion/pull/27302#discussion_r4525841829
##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -1194,6 +1189,71 @@ impl BinaryExpr {
}
}
+ /// Evaluates the RHS of `OR` only on the rows selected by `mask` (the rows
+ /// whose result depends on the RHS); the other rows are `fill_value`.
+ fn evaluate_pre_selection(
+ &self,
+ batch: &RecordBatch,
+ lhs: ColumnarValue,
+ mask: &BooleanArray,
+ fill_value: bool,
+ ) -> Result<ColumnarValue> {
+ // Use `filter_record_batch` directly because `evaluate_selection`
+ // scatters the RHS back to the original batch length.
+ let selection_batch = filter_record_batch(batch, mask)?;
Review Comment:
Can this be made to only use the required columns? wide batches can pay a
huge cost here
--
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]