You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/10 14:28:30 UTC
[GitHub] [spark] leanken commented on a change in pull request #29389: [SPARK-32573][SQL] Anti Join Improvement with EmptyHashedRelation and EmptyHashedRelationWithAllNullKeys
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org