imback82 commented on a change in pull request #28676:
URL: https://github.com/apache/spark/pull/28676#discussion_r446484892



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala
##########
@@ -60,6 +60,26 @@ case class BroadcastHashJoinExec(
     }
   }
 
+  override def outputPartitioning: Partitioning = {
+    def buildKeys: Seq[Expression] = buildSide match {
+      case BuildLeft => leftKeys
+      case BuildRight => rightKeys
+    }
+
+    joinType match {
+      case _: InnerLike =>
+        streamedPlan.outputPartitioning match {
+          case h: HashPartitioning =>
+            PartitioningCollection(Seq(h, HashPartitioning(buildKeys, 
h.numPartitions)))

Review comment:
       I added this check, but when `BroadcastHashJoinExec` executes, `t1`'s 
streamed side should have been shuffled by `t1.a` even if `t1` was originally 
partitioned by an unrelated column `c`, no?




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

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