szehon-ho commented on code in PR #53142:
URL: https://github.com/apache/spark/pull/53142#discussion_r2549168265


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala:
##########
@@ -951,10 +951,11 @@ case class KeyGroupedShuffleSpec(
       }
 
   override def createPartitioning(clustering: Seq[Expression]): Partitioning = 
{
-    val newExpressions: Seq[Expression] = 
clustering.zip(partitioning.expressions).map {
-      case (c, e: TransformExpression) => TransformExpression(
-        e.function, Seq(c), e.numBucketsOpt)
-      case (c, _) => c
+    val clusteringMap = 
distribution.clustering.map(_.canonicalized).zip(clustering).toMap
+    val newExpressions: Seq[Expression] = partitioning.expressions.map {
+      case te: TransformExpression =>

Review Comment:
   can we add a test as well for transform case?



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

Reply via email to