Github user mgaido91 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20717#discussion_r173404206
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
---
@@ -675,6 +676,22 @@ object InferFiltersFromConstraints extends
Rule[LogicalPlan] with PredicateHelpe
}
if (newConditionOpt.isDefined) Join(left, right, joinType,
newConditionOpt) else join
}
+
+ /**
+ * Returns additional constraints which are not enforced on the result
of join operations, but
+ * which can be enforced either on the left or the right side
--- End diff --
I haven't put it there, because `constraints` is created from
`allConstraints`, so adding them to `validConstraints` could have caused them
to be part of `constraints` too.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]