andygrove commented on a change in pull request #33910:
URL: https://github.com/apache/spark/pull/33910#discussion_r703630006
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AQEShuffleReadExec.scala
##########
@@ -82,8 +82,11 @@ case class AQEShuffleReadExec private(
// `RoundRobinPartitioning` but we don't need to retain the number of
partitions.
case r: RoundRobinPartitioning =>
r.copy(numPartitions = partitionSpecs.length)
- case other => throw new IllegalStateException(
- "Unexpected partitioning for coalesced shuffle read: " + other)
+ case _ =>
+ // Spark plugins may have custom partitioning and may replace this
operator
+ // during the postStageOptimization phase, so return
UnknownPartitioning here
+ // rather than throw an exception
+ UnknownPartitioning(partitionSpecs.length)
Review comment:
I added handlikng for `SinglePartition`. I didn't add handling for other
`Partitioning` classes such as `BroadcastPartitioning` and
`DataSourcePartitionin` because those didn't seem possible in this context but
let me know if I should add them.
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AQEShuffleReadExec.scala
##########
@@ -82,8 +82,11 @@ case class AQEShuffleReadExec private(
// `RoundRobinPartitioning` but we don't need to retain the number of
partitions.
case r: RoundRobinPartitioning =>
r.copy(numPartitions = partitionSpecs.length)
- case other => throw new IllegalStateException(
- "Unexpected partitioning for coalesced shuffle read: " + other)
+ case _ =>
+ // Spark plugins may have custom partitioning and may replace this
operator
+ // during the postStageOptimization phase, so return
UnknownPartitioning here
+ // rather than throw an exception
+ UnknownPartitioning(partitionSpecs.length)
Review comment:
I added handling for `SinglePartition`. I didn't add handling for other
`Partitioning` classes such as `BroadcastPartitioning` and
`DataSourcePartitionin` because those didn't seem possible in this context but
let me know if I should add them.
--
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]