mridulm commented on a change in pull request #35178:
URL: https://github.com/apache/spark/pull/35178#discussion_r784213791



##########
File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
##########
@@ -332,6 +339,10 @@ private[hive] class SparkExecuteStatementOperation(
           HiveThriftServer2.eventManager.onStatementFinish(statementId)
         }
       }
+      if (cleanShuffleDeps && rdd != null) {
+        rdd.cleanShuffleDependencies()
+        rdd = null

Review comment:
       When `THRIFTSERVER_INCREMENTAL_COLLECT` is `true`, we will end up 
cleaning up dependencies before we have used up the data from df.
   Wrap that iterator as a `CompletionIterator` and move this there ?




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