leanken commented on a change in pull request #29389:
URL: https://github.com/apache/spark/pull/29389#discussion_r467942977
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/BroadcastHashJoinExec.scala
##########
@@ -223,19 +223,19 @@ case class BroadcastHashJoinExec(
* Handles NULL-aware anti join (NAAJ) separately here.
*/
protected override def codegenAnti(ctx: CodegenContext, input:
Seq[ExprCode]): String = {
- if (isNullAwareAntiJoin) {
- val (broadcastRelation, relationTerm) = prepareBroadcast(ctx)
+ val (broadcastRelation, relationTerm) = prepareBroadcast(ctx)
Review comment:
I thought about this problem too.
HashJoin.scala does not have the API prepareBroadcast, only the following
prepareRelation available, which will not return HashedRelation.
```
protected def prepareRelation(ctx: CodegenContext): (String, Boolean)
```
I was thinking that call prepareBroadcast twice is OK since
broadcast.Broadcast[HashedRelation] is a future call, and the collect and build
action will only happen once, but the relationTerm will be generated twice
is it ok to just change prepareRelation to return a (String, Boolean,
HashedRelation) ??
tell me when you decided which way to go. @cloud-fan
----------------------------------------------------------------
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]