adrians commented on code in PR #50170:
URL: https://github.com/apache/spark/pull/50170#discussion_r2054160474


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala:
##########
@@ -298,6 +299,24 @@ object ReorderAssociativeOperator extends 
Rule[LogicalPlan] {
 }
 
 
+/**
+ * The "ArrayContains" node checks if a given value is present in a given 
array,
+ * being similar to the "IN" predicate.

Review Comment:
   I found the [CollectionExpressionsSuite: Array 
Contains](https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CollectionExpressionsSuite.scala#L762)
 set of tests which covers that part, in both unoptimized (by calling 
`checkEvaluation` and then `checkEvaluationWithoutCodegen`) and optimized (by 
calling `checkEvaluation` and then 
[`checkEvaluationWithOptimization`](https://github.com/apache/spark/blob/master/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala#L341)).
   
   Unfortunately I couldn't confirm that my rewrite-rule was active when 
triggering the tests and inserting a breakpoint with the debugger, so instead I 
duplicated the tests for the `ArrayContains` operations with similar `InSet` 
nodes, to confirm that the edge cases are handled in the same way.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to