This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 5d3802fba0 minor: remove unused code in binary.rs (#6203)
5d3802fba0 is described below

commit 5d3802fba0578448937e654475d667f9e410daad
Author: Andrew Lamb <[email protected]>
AuthorDate: Wed May 3 14:57:43 2023 -0400

    minor: remove unused code in binary.rs (#6203)
---
 datafusion/physical-expr/src/expressions/binary.rs | 26 ----------------------
 1 file changed, 26 deletions(-)

diff --git a/datafusion/physical-expr/src/expressions/binary.rs 
b/datafusion/physical-expr/src/expressions/binary.rs
index 5a82be5e2e..5ca7b9ddf2 100644
--- a/datafusion/physical-expr/src/expressions/binary.rs
+++ b/datafusion/physical-expr/src/expressions/binary.rs
@@ -671,32 +671,6 @@ impl PhysicalExpr for BinaryExpr {
         let schema = batch.schema();
         let input_schema = schema.as_ref();
 
-        match (&left_value, &left_data_type, &right_value, &right_data_type) {
-            // Types are equal => valid
-            // Decimal types can be different but still valid as we coerce 
them to the same type later
-            (_, l, _, r) if l == r || (is_decimal(l) && is_decimal(r)) => {}
-            // Allow comparing a dictionary value with its corresponding 
scalar value
-            (
-                ColumnarValue::Array(_),
-                DataType::Dictionary(_, dict_t),
-                ColumnarValue::Scalar(_),
-                scalar_t,
-            )
-            | (
-                ColumnarValue::Scalar(_),
-                scalar_t,
-                ColumnarValue::Array(_),
-                DataType::Dictionary(_, dict_t),
-            ) if dict_t.as_ref() == scalar_t
-                || (is_decimal(dict_t.as_ref()) && is_decimal(scalar_t)) => {}
-            _ => {
-                return Err(DataFusionError::Internal(format!(
-                    "Cannot evaluate binary expression {:?} with types {:?} 
and {:?}",
-                    self.op, left_data_type, right_data_type
-                )));
-            }
-        }
-
         // Coerce decimal types to the same scale and precision
         let coerced_type = coercion_decimal_mathematics_type(
             &self.op,

Reply via email to