Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20717#discussion_r173269537
  
    --- 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 --
    
    why not put this in `Join.validConstraints`? `LogicalPlan.constraints` 
should only contain constraints for the plab output, but 
`LogicalPlan.allConstraints` can contain more.


---

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

Reply via email to