You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/04/12 02:32:40 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #40742: [SPARK-43095][SQL] Avoid Once strategy's idempotence is broken for batch: `Infer Filters`

cloud-fan commented on code in PR #40742:
URL: https://github.com/apache/spark/pull/40742#discussion_r1163509684


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala:
##########
@@ -1430,6 +1430,10 @@ object InferFiltersFromConstraints extends Rule[LogicalPlan]
       .union(constructIsNotNullConstraints(constraints, plan.output))
       .filter { c =>
         c.references.nonEmpty && c.references.subsetOf(plan.outputSet) && c.deterministic
+      }.filterNot {
+        // Avoid once strategy idempotence is broken.
+        case a EqualNullSafe b => a.semanticEquals(b)

Review Comment:
   can we fix the place that generates this useless predicate?



-- 
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-unsubscribe@spark.apache.org

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


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