mihailoale-db commented on code in PR #59646:
URL: https://github.com/apache/spark/pull/59646#discussion_r4336556145


##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala:
##########
@@ -1034,3 +1020,23 @@ class ResolveSessionCatalog(val catalogManager: 
CatalogManager)
   }
 
 }
+
+object ResolveSessionCatalog {

Review Comment:
   I would move both this and `ResolvedV1Identifier` to separate files to 
decouple from fixed-point analyzer rules and rename.



##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala:
##########
@@ -1034,3 +1020,23 @@ class ResolveSessionCatalog(val catalogManager: 
CatalogManager)
   }
 
 }
+
+object ResolveSessionCatalog {
+  /** Whether commands on `catalog` can be converted to V1 session-catalog 
commands. */
+  def supportsV1Command(catalog: CatalogPlugin): Boolean = {
+    CatalogV2Util.isSessionCatalog(catalog) && (
+      SQLConf.get.getConf(SQLConf.V2_SESSION_CATALOG_IMPLEMENTATION) == 
"builtin" ||
+        catalog.isInstanceOf[CatalogExtension])
+  }
+
+  /** Extracts a V1 identifier, rejecting namespaces that cannot be 
represented in V1. */
+  object ResolvedV1Identifier {
+    import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._

Review Comment:
   Let's move imports to the top of the file.



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