ulysses-you commented on code in PR #38159:
URL: https://github.com/apache/spark/pull/38159#discussion_r990982714


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/ShuffledHashJoinExec.scala:
##########
@@ -88,6 +90,9 @@ case class ShuffledHashJoinExec(
       ignoresDuplicatedKey = ignoreDuplicatedKey)
     buildTime += NANOSECONDS.toMillis(System.nanoTime() - start)
     buildDataSize += relation.estimatedSize
+    hashRelation = relation
+    // cleanup build plan resource eagerly since all rows have been consumed

Review Comment:
   I thought about it. It needs more code change if we want to do this in shj 
itself.
   
   shj does not have a unified scanner compared with smj, so if we want to 
release hash relation at the end of output itrator, we need to wrap a new 
Iterator for shj. Then change all join types with codegen non-codegen code path 
to use the new Iterator. It will be a code refactor.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to