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 2022/10/10 07:35:21 UTC

[GitHub] [spark] ulysses-you commented on a diff in pull request #38159: [SPARK-40594][SQL] Eagerly release hashed relation in ShuffledHashJoin

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: reviews-unsubscribe@spark.apache.org

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