MonkeyCanCode commented on code in PR #59952:
URL: https://github.com/apache/spark/pull/59952#discussion_r4429659932


##########
sql/catalyst/src/main/java/org/apache/spark/sql/connector/catalog/CatalogPlugin.java:
##########
@@ -39,6 +39,12 @@
  * {@code spark.sql.catalog.catalog-name.(key)=(value)} will be passed in the 
case insensitive
  * string map of options in initialization with the prefix removed.
  * {@code name}, is also passed and is the catalog's name; in this case, 
"catalog-name".
+ * <p>
+ * Catalog instances are loaded per session. Implementations that hold 
resources such as clients,
+ * connections or thread pools can also implement {@link java.io.Closeable} (or
+ * {@link AutoCloseable}). Spark calls {@code close()} when it releases the 
session that loaded

Review Comment:
   This is fixed.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogManager.scala:
##########
@@ -526,6 +547,34 @@ private[sql] class DefaultCatalogManager(
     }
     v1SessionCatalog.setCurrentDatabase(conf.defaultDatabase)
   }
+
+  // Close and unregister every catalog loaded by this manager that implements 
`AutoCloseable`.

Review Comment:
   This is fixed.



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