srielau commented on code in PR #55647:
URL: https://github.com/apache/spark/pull/55647#discussion_r3177635737


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogManager.scala:
##########
@@ -202,12 +202,59 @@ class CatalogManager(
       currentCatalog, currentNamespace,
       currentCatalog, currentNamespace)
 
-  /** True if [[sqlResolutionPathEntries]] includes `system.session`. */
-  def sessionScopeUnqualifiedAllowed(
-      currentCatalog: String,
-      currentNamespace: Seq[String]): Boolean =
-    sqlResolutionPathEntries(currentCatalog, currentNamespace)
-      .exists(CatalogManager.isSystemSessionPathEntry)
+  /**
+   * True if `system.session` is on the SQL path. Only literal path entries 
can match; the
+   * [[CurrentSchemaEntry]] marker can never be `system.session`. Inspecting 
stored entries

Review Comment:
   Good point. Updated the Scaladoc in c2f8f642c45 to spell out the 
load-bearing assumption: `system` is not a registered catalog (only the 
internal `FakeSystemCatalog`), so `currentCatalog.name()` -- and therefore 
`CurrentSchemaEntry`'s expansion `currentCatalog.name() +: currentNamespace` -- 
cannot start with `"system"`. If that ever changes (e.g. a real catalog gets 
registered under `system`), this short-circuit must be revisited.



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