wzhfy commented on a change in pull request #29671:
URL: https://github.com/apache/spark/pull/29671#discussion_r484734168
##########
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:
I'm also surprised it throws an exception instead of returning an empty
iterator. I'm not sure if there is any particular reason to do this. But I'll
try to update as your suggestion and see if it works, thanks!
----------------------------------------------------------------
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]