peter-toth commented on code in PR #54335:
URL: https://github.com/apache/spark/pull/54335#discussion_r2826444873
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala:
##########
@@ -72,10 +72,15 @@ case class BroadcastHashJoinExec private(
override lazy val outputPartitioning: Partitioning = {
joinType match {
case _: InnerLike if conf.broadcastHashJoinOutputPartitioningExpandLimit
> 0 =>
- streamedPlan.outputPartitioning match {
- case h: HashPartitioningLike => expandOutputPartitioning(h)
- case c: PartitioningCollection => expandOutputPartitioning(c)
- case other => other
+ val expandedPartitioning =
expandOutputPartitioning(streamedPlan.outputPartitioning)
+ expandedPartitioning match {
+ case Nil =>
+ // This could only happen if `streamedPlan.outputPartitioning` was
an empty
+ // `PartitioningCollection`, but in that case
`UnknownPartitioning` is always a valid
+ // alternative.
+ UnknownPartitioning(streamedPlan.outputPartitioning.numPartitions)
Review Comment:
You are right, I think we can remove this branch.
--
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]