imback82 commented on a change in pull request #28123: [SPARK-31350][SQL]
Coalesce bucketed tables for join if applicable
URL: https://github.com/apache/spark/pull/28123#discussion_r406579248
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
##########
@@ -309,7 +328,8 @@ case class FileSourceScanExec(
files.map(_.getPath.getName).groupBy(file =>
BucketingUtils.getBucketId(file))
val singleFilePartitions = bucketToFilesGrouping.forall(p =>
p._2.length <= 1)
- if (singleFilePartitions) {
+ // TODO Sort order is currently ignored if buckets are coalesced.
Review comment:
Yes. This will eliminate the sort when there are multiple files per bucket
(and if each file is sorted).
And it seems that the work will be orthogonal to this PR anyway, so I will
give it a shot and create a PR if I see some improvements in benchmark.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]