spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zecevicp <...@git.apache.org>
Subject [GitHub] spark pull request #21109: [SPARK-24020][SQL] Sort-merge join inner range op...
Date Thu, 07 Jun 2018 13:52:22 GMT
Github user zecevicp commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21109#discussion_r193753965
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/joins/InnerJoinSuite.scala
---
    @@ -117,101 +131,170 @@ class InnerJoinSuite extends SparkPlanTest with SharedSQLContext
{
         }
     
         def makeSortMergeJoin(
    -        leftKeys: Seq[Expression],
    -        rightKeys: Seq[Expression],
    -        boundCondition: Option[Expression],
    -        leftPlan: SparkPlan,
    -        rightPlan: SparkPlan) = {
    -      val sortMergeJoin = joins.SortMergeJoinExec(leftKeys, rightKeys, Inner, boundCondition,
    -        leftPlan, rightPlan)
    +                           leftKeys: Seq[Expression],
    +                           rightKeys: Seq[Expression],
    +                           boundCondition: Option[Expression],
    +                           rangeConditions: Seq[BinaryComparison],
    +                           leftPlan: SparkPlan,
    +                           rightPlan: SparkPlan) = {
    +      val sortMergeJoin = joins.SortMergeJoinExec(leftKeys, rightKeys, Inner, rangeConditions,
    +        boundCondition, leftPlan, rightPlan)
           EnsureRequirements(spark.sessionState.conf).apply(sortMergeJoin)
         }
     
    -    test(s"$testName using BroadcastHashJoin (build=left)") {
    -      extractJoinParts().foreach { case (_, leftKeys, rightKeys, boundCondition, _, _)
=>
    -        withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "1") {
    -          checkAnswer2(leftRows, rightRows, (leftPlan: SparkPlan, rightPlan: SparkPlan)
=>
    -            makeBroadcastHashJoin(
    -              leftKeys, rightKeys, boundCondition, leftPlan, rightPlan, joins.BuildLeft),
    -            expectedAnswer.map(Row.fromTuple),
    -            sortAnswers = true)
    +    val configOptions = List(
    +      ("spark.sql.codegen.wholeStage", "true"),
    +      ("spark.sql.codegen.wholeStage", "false"))
    +
    +    // Disabling these because the code would never follow this path in case of a inner
range join
    +    if (!expectRangeJoin) {
    +      var counter = 1
    --- End diff --
    
    OK, will do that.


---

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


Mime
View raw message