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

    https://github.com/apache/spark/pull/20069#discussion_r158885112
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -47,6 +48,15 @@ trait Predicate extends Expression {
     
     
     trait PredicateHelper {
    +
    +  protected def partitionByDeterminism(predicates: Seq[Expression]) = {
    +    if (SQLConf.get.outOfOrderPredicateEvaluationEnabled) {
    +      predicates.partition(_.deterministic)
    +    } else {
    +      predicates.span(_.deterministic)
    +    }
    +  }
    +
    --- End diff --
    
    Is not this "if" in the other way around here? As Seq#partition keeps the 
relative orders and Seq#span does not.
    After reversing this "if" the "outOfOrderPredicateEvaluationEnabled" 
default value (true) will be consistent with the old behavior, before your PR 
(I mean using the Seq#span), but in the unit tests the relevant "if" conditions 
should be changed too.



---

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

Reply via email to