tmnd1991 commented on code in PR #9192:
URL: https://github.com/apache/iceberg/pull/9192#discussion_r1420295733


##########
spark/v3.5/spark-extensions/src/main/scala/org/apache/spark/sql/catalyst/optimizer/ReplaceStaticInvoke.scala:
##########
@@ -40,14 +37,20 @@ import org.apache.spark.sql.types.StructType
 object ReplaceStaticInvoke extends Rule[LogicalPlan] {
 
   override def apply(plan: LogicalPlan): LogicalPlan =
-    plan.transformWithPruning (_.containsAllPatterns(BINARY_COMPARISON, 
FILTER)) {
+    plan.transformWithPruning (_.containsPattern(FILTER)) {
       case filter @ Filter(condition, _) =>
-        val newCondition = 
condition.transformWithPruning(_.containsPattern(BINARY_COMPARISON)) {
+        val newCondition = 
condition.transformWithPruning(_.containsAnyPattern(BINARY_COMPARISON, IN, 
INSET)) {
           case c @ BinaryComparison(left: StaticInvoke, right) if 
canReplace(left) && right.foldable =>
             c.withNewChildren(Seq(replaceStaticInvoke(left), right))
 
           case c @ BinaryComparison(left, right: StaticInvoke) if 
canReplace(right) && left.foldable =>
             c.withNewChildren(Seq(left, replaceStaticInvoke(right)))
+
+          case in @ In(value: StaticInvoke, _) if canReplace(value) =>

Review Comment:
   done as suggested



-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to