cloud-fan commented on a change in pull request #35225:
URL: https://github.com/apache/spark/pull/35225#discussion_r785661526



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala
##########
@@ -441,7 +441,7 @@ case class HashShuffleSpec(
     distribution.clustering.zipWithIndex.foreach { case (distKey, distKeyPos) 
=>
       distKeyToPos.getOrElseUpdate(distKey.canonicalized, 
mutable.BitSet.empty).add(distKeyPos)
     }
-    partitioning.expressions.map(k => distKeyToPos(k.canonicalized))
+    partitioning.expressions.map(k => distKeyToPos.getOrElse(k.canonicalized, 
mutable.BitSet.empty))

Review comment:
       This change is needed to pass the new test: 
https://github.com/apache/spark/pull/35225/files#diff-dd5267ed90ff4f7191facb46157728eee14f225ae64dc867d095aa924444f8f1R78




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