spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark pull request #18694: [SPARK-21492][SQL] Memory leak in SortMergeJoin
Date Fri, 21 Jul 2017 02:15:24 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18694#discussion_r128671222
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
---
    @@ -649,6 +660,11 @@ private[joins] class SortMergeJoinScanner(
       // Initialization (note: do _not_ want to advance streamed here).
       advancedBufferedToRowWithNullFreeJoinKey()
     
    +  def destruct(): Unit = {
    +     while (streamedIter.advanceNext()) {}
    +     while (bufferedIter.advanceNext()) {}
    --- End diff --
    
    I think if we don't advance to next rows, the iterators should not load the rows? If you
exhaust the iterators, it actually spend unnecessary time to pull and process those rows.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message