Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/21109#discussion_r188240371 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala --- @@ -131,13 +134,101 @@ 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. + val rangePreds: mutable.Set[Expression] = mutable.Set.empty + var rangeConditions: Seq[BinaryComparison] = + if (SQLConf.get.useSmjInnerRangeOptimization) { // && SQLConf.get.wholeStageEnabled) { --- End diff -- remove the comment please
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org