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

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


The following commit(s) were added to refs/heads/main by this push:
     new 558a5930 chore: Use in_list func directly (#559)
558a5930 is described below

commit 558a593096f87a7569b1553aad631337b15c7c92
Author: advancedxy <[email protected]>
AuthorDate: Thu Jun 13 14:26:27 2024 +0900

    chore: Use in_list func directly (#559)
---
 core/src/execution/datafusion/planner.rs | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/core/src/execution/datafusion/planner.rs 
b/core/src/execution/datafusion/planner.rs
index d92bf578..cd9822d6 100644
--- a/core/src/execution/datafusion/planner.rs
+++ b/core/src/execution/datafusion/planner.rs
@@ -29,8 +29,8 @@ use datafusion::{
         execution_props::ExecutionProps,
         expressions::{
             in_list, BinaryExpr, BitAnd, BitOr, BitXor, CaseExpr, CastExpr, 
Column, Count,
-            FirstValue, InListExpr, IsNotNullExpr, IsNullExpr, LastValue,
-            Literal as DataFusionLiteral, Max, Min, NotExpr, Sum,
+            FirstValue, IsNotNullExpr, IsNullExpr, LastValue, Literal as 
DataFusionLiteral, Max,
+            Min, NotExpr, Sum,
         },
         AggregateExpr, PhysicalExpr, PhysicalSortExpr, ScalarFunctionExpr,
     },
@@ -544,18 +544,7 @@ impl PhysicalPlanner {
                     .map(|x| self.create_expr(x, input_schema.clone()))
                     .collect::<Result<Vec<_>, _>>()?;
 
-                // if schema contains any dictionary type, we should use 
InListExpr instead of
-                // in_list as it doesn't handle value being dictionary type 
correctly
-                let contains_dict_type = input_schema
-                    .fields()
-                    .iter()
-                    .any(|f| matches!(f.data_type(), DataType::Dictionary(_, 
_)));
-                if contains_dict_type {
-                    // TODO: remove the fallback when 
https://github.com/apache/arrow-datafusion/issues/9530 is fixed
-                    Ok(Arc::new(InListExpr::new(value, list, expr.negated, 
None)))
-                } else {
-                    in_list(value, list, &expr.negated, 
input_schema.as_ref()).map_err(|e| e.into())
-                }
+                in_list(value, list, &expr.negated, 
input_schema.as_ref()).map_err(|e| e.into())
             }
             ExprStruct::If(expr) => {
                 let if_expr =


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to