spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marmbrus <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-2213] [SQL] sort merge join for spark s...
Date Mon, 13 Apr 2015 22:44:38 GMT
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5208#discussion_r28286620
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/Exchange.scala ---
    @@ -69,7 +72,16 @@ case class Exchange(newPartitioning: Partitioning, child: SparkPlan)
extends Una
               }
             }
             val part = new HashPartitioner(numPartitions)
    -        val shuffled = new ShuffledRDD[Row, Row, Row](rdd, part)
    +        val shuffled = sort match {
    +          case false => new ShuffledRDD[Row, Row, Row](rdd, part)
    +          case true =>
    +            val sortingExpressions = expressions.zipWithIndex.map {
    +              case (exp, index) =>
    +                new SortOrder(BoundReference(index, exp.dataType, exp.nullable), Ascending)
    --- End diff --
    
    This is not correct.  You don't want to construct your own `BoundReference`s otherwise
the expression `a,b,c` will sort the same a `c,b,a`.


---
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