pepijnve commented on code in PR #17973:
URL: https://github.com/apache/datafusion/pull/17973#discussion_r2419150164
##########
datafusion/physical-expr-common/src/physical_expr.rs:
##########
@@ -97,14 +97,26 @@ pub trait PhysicalExpr: Any + Send + Sync + Display + Debug
+ DynEq + DynHash {
batch: &RecordBatch,
selection: &BooleanArray,
) -> Result<ColumnarValue> {
- let tmp_batch = filter_record_batch(batch, selection)?;
+ let selection_count = selection.true_count();
- let tmp_result = self.evaluate(&tmp_batch)?;
Review Comment:
I might be missing it, but I don't see the overlap with
`filter_record_batch`. AFAICT there are no checks to avoid creating a new
record batch. What this code is doing is preparing an empty result value while
`filter_record_batch` has optimised code to an empty record batch if the filter
is all-false.
--
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]