WinkerDu commented on code in PR #2510: URL: https://github.com/apache/arrow-datafusion/pull/2510#discussion_r878355149
########## datafusion/physical-expr/src/expressions/binary.rs: ########## @@ -1255,14 +1235,25 @@ impl BinaryExpr { scalar: &ScalarValue, array: &ArrayRef, ) -> Result<Option<Result<ArrayRef>>> { + let bool_type = &DataType::Boolean; let scalar_result = match &self.op { - Operator::Lt => binary_array_op_scalar!(array, scalar.clone(), gt), - Operator::LtEq => binary_array_op_scalar!(array, scalar.clone(), gt_eq), - Operator::Gt => binary_array_op_scalar!(array, scalar.clone(), lt), - Operator::GtEq => binary_array_op_scalar!(array, scalar.clone(), lt_eq), - Operator::Eq => binary_array_op_scalar!(array, scalar.clone(), eq), + Operator::Lt => { + binary_array_op_dyn_scalar!(array, scalar.clone(), gt, bool_type) Review Comment: Sorry for late response, love this fix ❤️ -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org