Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19781#discussion_r151963108
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala
---
@@ -76,7 +76,7 @@ case class BroadcastHashJoinExec(
streamedPlan.asInstanceOf[CodegenSupport].inputRDDs()
}
- override def needCopyResult: Boolean = joinType match {
+ private def checkNeedCopyResultFromJoinType: Boolean = joinType match {
--- End diff --
I think we can merge these 2 methods:
```
case _: InnerLike | LeftOuter | RightOuter =>
streamedPlan.asInstanceOf[CodegenSupport].needCopyResult ||
!buildPlan.executeBroadcast[HashedRelation]().value.keyIsUnique
case _ => streamedPlan.asInstanceOf[CodegenSupport].needCopyResult
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]