spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hvanhovell <...@git.apache.org>
Subject [GitHub] spark pull request #15763: [SPARK-17348][SQL] Incorrect results from subquer...
Date Mon, 14 Nov 2016 14:55:49 GMT
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15763#discussion_r87813912
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
    @@ -1041,12 +1070,24 @@ class Analyzer(
             localPredicateReferences -- p.outputSet
           }
     
    +      var foundNonEqualCorrelatedPred : Boolean = false
    +
           // Simplify the predicates before pulling them out.
           val transformed = BooleanSimplification(sub) transformUp {
             case f @ Filter(cond, child) =>
               // Find all predicates with an outer reference.
               val (correlated, local) = splitConjunctivePredicates(cond).partition(containsOuter)
     
    +          // Find any non-equality correlated predicates
    --- End diff --
    
    This is a bit more concise and will terminate as soon as we find a non-equal predicate.
    ```scala
    foundNonEqualCorrelatedPred = foundNonEqualCorrelatedPred || correlated.exists {
      case _: EqualTo | _: EqualNullSafe => false
      case _ => true
    }
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message