szehon-ho commented on code in PR #53859:
URL: https://github.com/apache/spark/pull/53859#discussion_r2738064271
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala:
##########
@@ -224,8 +227,11 @@ case class EnsureRequirements(
child match {
case ShuffleExchangeExec(_, c, so, ps) =>
- ShuffleExchangeExec(newPartitioning, c, so, ps)
- case _ => ShuffleExchangeExec(newPartitioning, child)
+ val newChild = disableKeyGroupingIfNotNeeded(c)
+ ShuffleExchangeExec(newPartitioning, newChild, so, ps)
+ case _ =>
+ val newChild = disableKeyGroupingIfNotNeeded(child)
Review Comment:
could we make a method createShuffleExchangeExec(..., disableGrouping:
Boolean) to reduce duplication?
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -622,6 +623,11 @@ object QueryExecution {
sparkSession: SparkSession,
adaptiveExecutionRule: Option[InsertAdaptiveSparkPlan] = None,
subquery: Boolean): Seq[Rule[SparkPlan]] = {
+ val requiredDistribution = if (subquery) {
Review Comment:
not sure i get this, if its not a subquery we pass in any
requiredDistribution?
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/StoragePartitionJoinParams.scala:
##########
@@ -29,13 +29,15 @@ case class StoragePartitionJoinParams(
commonPartitionValues: Option[Seq[(InternalRow, Int)]] = None,
reducers: Option[Seq[Option[Reducer[_, _]]]] = None,
applyPartialClustering: Boolean = false,
- replicatePartitions: Boolean = false) {
+ replicatePartitions: Boolean = false,
+ noGrouping: Boolean = false) {
Review Comment:
nit: disableGrouping? to be consistent with the EnsureRequirements
terminology
--
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]