GitHub user JoshRosen opened a pull request: https://github.com/apache/spark/pull/6773
[SPARK-8319] [CORE] [SQL] Update logic related to key orderings in shuffle dependencies This patch updates two pieces of logic that are related to handling of keyOrderings in ShuffleDependencies: - The Tungsten ShuffleManager falls back to regular SortShuffleManager whenever the shuffle dependency specifies a key ordering, but technically we only need to fall back when an aggregator is also specified. This patch updates the fallback logic to reflect this so that the Tungsten optimizations can apply to more workloads. - The SQL Exchange operator performs defensive copying of shuffle inputs when a key ordering is specified, but this is unnecessary: SortShuffleManager is the only shuffle manager that performs sorting on the map side, and it only does so when an aggregator is specified. SQL never uses Spark's shuffle for performing aggregation, so this copying is unnecessary. You can merge this pull request into a Git repository by running: $ git pull https://github.com/JoshRosen/spark SPARK-8319 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/6773.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #6773 ---- commit 8467c7e823fd4a76dda0e527b67c743bf531e6db Author: Josh Rosen <joshro...@databricks.com> Date: 2015-06-12T01:02:08Z Enable Tungsten shuffle for non-agg shuffles w/ key orderings commit dfb8fadf2f3351731620eab6b981b70024a726d4 Author: Josh Rosen <joshro...@databricks.com> Date: 2015-06-12T01:09:16Z Avoid unnecessary copy in SQL Exchange commit 85a46287e2264ff4d736a5feabe1b36becb519af Author: Josh Rosen <joshro...@databricks.com> Date: 2015-06-12T01:13:12Z Update comment to clarify circumstances under which shuffle operates on serialized records ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org