cloud-fan commented on a change in pull request #26164: [SPARK-21492][SQL] Fix 
memory leak in SortMergeJoin
URL: https://github.com/apache/spark/pull/26164#discussion_r336532101
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/SortExec.scala
 ##########
 @@ -181,4 +189,17 @@ case class SortExec(
        |$sorterVariable.insertRow((UnsafeRow)${row.value});
      """.stripMargin
   }
+
+  /**
+   * In SortExec, we overwrites cleanupResources to close 
UnsafeExternalRowSorter.
+   */
+  override protected[sql] def cleanupResources(): Unit = {
+    super.cleanupResources()
 
 Review comment:
   shall we release itself before releasing the children?

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


With regards,
Apache Git Services

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

Reply via email to