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

    https://github.com/apache/spark/pull/20670#discussion_r171182102
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/QueryPlanConstraints.scala
 ---
    @@ -22,21 +22,30 @@ import org.apache.spark.sql.catalyst.expressions._
     
     trait QueryPlanConstraints { self: LogicalPlan =>
     
    +  /**
    +   * An [[ExpressionSet]] that contains an additional set of constraints 
about equality
    +   * constraints and `isNotNull` constraints.
    +   */
    +  lazy val allConstraints: ExpressionSet = {
    +    if (conf.constraintPropagationEnabled) {
    +      ExpressionSet(validConstraints
    +        .union(inferAdditionalConstraints(validConstraints))
    +        .union(constructIsNotNullConstraints(validConstraints)))
    +    } else {
    +      ExpressionSet(Set.empty)
    +    }
    +  }
    +
       /**
        * An [[ExpressionSet]] that contains invariants about the rows output 
by this operator. For
        * example, if this set contains the expression `a = 2` then that 
expression is guaranteed to
        * evaluate to `true` for all rows produced.
        */
       lazy val constraints: ExpressionSet = {
         if (conf.constraintPropagationEnabled) {
    --- End diff --
    
    now we don't need this if.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to