You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "wangyum (via GitHub)" <gi...@apache.org> on 2023/04/13 07:13:16 UTC
[GitHub] [spark] wangyum commented on a diff in pull request #40742: [SPARK-43095][SQL] Avoid Once strategy's idempotence is broken for batch: `Infer Filters`
wangyum commented on code in PR #40742:
URL: https://github.com/apache/spark/pull/40742#discussion_r1165099660
##########
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:
Yes. Moved it to `ConstraintHelper.inferAdditionalConstraints`.
--
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