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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]