Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/21109#discussion_r193735061 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala --- @@ -131,13 +135,100 @@ object ExtractEquiJoinKeys extends Logging with PredicateHelper { if (joinKeys.nonEmpty) { val (leftKeys, rightKeys) = joinKeys.unzip - logDebug(s"leftKeys:$leftKeys | rightKeys:$rightKeys") - Some((joinType, leftKeys, rightKeys, otherPredicates.reduceOption(And), left, right)) + // Find any simple range expressions between two columns + // (and involving only those two columns) of the two tables being joined, + // which are not used in the equijoin expressions, + // and which can be used for secondary sort optimizations. + // rangePreds will contain the original expressions to be filtered out later. + val rangePreds: mutable.Set[Expression] = mutable.Set.empty --- End diff -- I tend to prefer `val rangePreds = mutable.Set.empty[Expression]` as it's shorter, but that's just taste
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org