wangyum commented on code in PR #39512:
URL: https://github.com/apache/spark/pull/39512#discussion_r1067605737
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala:
##########
@@ -76,13 +76,17 @@ case class EnsureRequirements(
case _ => false
}.map(_._2)
- // Special case: if all sides of the join are single partition
- val allSinglePartition =
- childrenIndexes.forall(children(_).outputPartitioning == SinglePartition)
+ // Special case: if all sides of the join are single partition and it's
physical size less than
+ // or equal advisoryPartitionSizeInBytes.
+ val preferSinglePartition = childrenIndexes.forall { i =>
+ children(i).outputPartitioning == SinglePartition &&
+ children(i).logicalLink
+ .forall(_.stats.sizeInBytes <=
conf.getConf(SQLConf.ADVISORY_PARTITION_SIZE_IN_BYTES))
Review Comment:
How about `SQLConf.FILES_MAX_PARTITION_BYTES`?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]