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/09/08 08:24:42 UTC
[GitHub] [spark] leanken commented on a change in pull request #29671: [SPARK-32817][SQL] DPP throws error when broadcast side is empty
leanken commented on a change in pull request #29671:
URL: https://github.com/apache/spark/pull/29671#discussion_r484740226
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/SubqueryBroadcastExec.scala
##########
@@ -75,17 +75,21 @@ case class SubqueryBroadcastExec(
val beforeCollect = System.nanoTime()
val broadcastRelation = child.executeBroadcast[HashedRelation]().value
- val (iter, expr) = if (broadcastRelation.isInstanceOf[LongHashedRelation]) {
- (broadcastRelation.keys(), HashJoin.extractKeyExprAt(buildKeys, index))
- } else {
- (broadcastRelation.keys(),
- BoundReference(index, buildKeys(index).dataType, buildKeys(index).nullable))
+ val rows = broadcastRelation match {
+ case EmptyHashedRelation =>
+ Array.empty[InternalRow]
Review comment:
it's originally throws an exception because it's supposed not to be called. But since you found a exception case here, i think it should return a empty iterator instead.
----------------------------------------------------------------
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