Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18299#discussion_r122072883
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlanConstraints.scala
 ---
    @@ -27,18 +27,20 @@ trait QueryPlanConstraints[PlanType <: 
QueryPlan[PlanType]] { self: QueryPlan[Pl
        * 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 = 
ExpressionSet(getRelevantConstraints(validConstraints))
    -
    -  /**
    -   * Returns [[constraints]] depending on the config of enabling 
constraint propagation. If the
    -   * flag is disabled, simply returning an empty constraints.
    -   */
    -  def getConstraints(constraintPropagationEnabled: Boolean): ExpressionSet 
=
    -    if (constraintPropagationEnabled) {
    -      constraints
    +  lazy val constraints: ExpressionSet = {
    +    if (conf.constraintPropagationEnabled) {
    +      ExpressionSet(
    +        validConstraints
    +          .union(inferAdditionalConstraints(validConstraints))
    +          .union(constructIsNotNullConstraints(validConstraints))
    +          .filter { c =>
    +            c.references.nonEmpty && c.references.subsetOf(outputSet) && 
c.deterministic
    +          }
    --- End diff --
    
    That belongs in a separate patch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to