srowen commented on a change in pull request #32717:
URL: https://github.com/apache/spark/pull/32717#discussion_r643370923



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala
##########
@@ -225,10 +231,31 @@ case class CachedRDDBuilder(
     _cachedColumnBuffers
   }
 
+  def manualClose[T <: CachedBatch](entry: T): T = {
+    val entryManualCloseTasks = Future {
+      entry match {
+        case o: AutoCloseable =>
+          try {
+            o.close

Review comment:
       I'm not arguing against Future - just arguing that it's pointless to 
make a Future if there is nothing to close. The code could be rearranged (here 
and in the previous commit) to maybe take advantage of that? not sure. Also see 
comment in your other PR about a thread pool, perhaps.
   
   Such an impl should be implementing finalize of course but I do agree it's 
OK to try to proactively close.




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



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

Reply via email to