dharanad commented on code in PR #11247: URL: https://github.com/apache/datafusion/pull/11247#discussion_r1664226218
########## datafusion/physical-expr/src/expressions/binary.rs: ########## @@ -257,7 +257,56 @@ impl PhysicalExpr for BinaryExpr { fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> { use arrow::compute::kernels::numeric::*; + #[inline] + fn check_short_circuit(arg: &ColumnarValue, op: &Operator) -> bool { + let data_type = arg.data_type(); + if data_type == DataType::Boolean { + if *op == Operator::And { + match arg { + ColumnarValue::Array(array) => { + if let Ok(array) = as_boolean_array(&array) { + if array.true_count() == 0 { Review Comment: Nit: We can return inline `return array.true_count() == 0` here. Same for other places below -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org