alamb commented on code in PR #11849:
URL: https://github.com/apache/datafusion/pull/11849#discussion_r1706047864


##########
datafusion/sql/src/expr/mod.rs:
##########
@@ -631,6 +631,31 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
             SQLExpr::Map(map) => {
                 self.try_plan_map_literal(map.entries, schema, planner_context)
             }
+            SQLExpr::AnyOp {
+                left,
+                compare_op,
+                right,
+            } => {
+                if compare_op != BinaryOperator::Eq {
+                    return plan_err!(
+                        "Unsupported AnyOp: {compare_op}, only '=' is 
supported"
+                    );
+                }
+
+                let Some(fun) = 
self.context_provider.get_function_meta("array_has")

Review Comment:
   What do you think about making this an expr planner rather than directly 
getting the function via name?
   
   
https://docs.rs/datafusion/latest/datafusion/logical_expr/planner/trait.ExprPlanner.html
   
   like `ExprPlanner::plan_any` or something?



##########
datafusion/functions-nested/src/array_has.rs:
##########
@@ -262,26 +262,26 @@ enum ComparisonType {
 }
 
 fn general_array_has_dispatch<O: OffsetSizeTrait>(
-    array: &ArrayRef,
-    sub_array: &ArrayRef,
+    haystack: &ArrayRef,

Review Comment:
   💯  for improved names



-- 
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]

Reply via email to