srielau commented on code in PR #55717:
URL: https://github.com/apache/spark/pull/55717#discussion_r3196669339
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala:
##########
@@ -113,17 +113,34 @@ class SessionCatalog(
identifier.copy(funcName = "") == SESSION_NAMESPACE_TEMPLATE
/**
- * Session function kinds in resolution order for unqualified lookups.
- * Matches [[SQLConf.sessionFunctionResolutionOrder]]: "first" (session
first),
- * "second" (default), "last" (builtin only; session tried after persistent).
+ * Provider for the ordered `system.builtin` / `system.session` entries on
the effective SQL
+ * PATH (mapped to [[SessionFunctionKind]]). Wired by
+ * [[org.apache.spark.sql.connector.catalog.CatalogManager]] after
construction so unqualified
+ * function lookups and the security check that blocks temp functions from
shadowing builtins
+ * read the live PATH (post-`SET PATH`, with [[SQLConf.DEFAULT_PATH]] and
+ * [[SQLConf.defaultPathOrder]] fallbacks already applied) instead of the
legacy
+ * [[SQLConf.SESSION_FUNCTION_RESOLUTION_ORDER]] proxy.
+ *
+ * The default reproduces the previous "second" behavior
(builtin-then-session) for tests
+ * that construct a [[SessionCatalog]] directly without going through
[[CatalogManager]].
*/
- private def sessionFunctionKindsInResolutionOrder: Seq[SessionFunctionKind]
= {
- conf.sessionFunctionResolutionOrder match {
- case "first" => Seq(Temp, Builtin)
- case "last" => Seq(Builtin)
- case _ => Seq(Builtin, Temp) // "second" (default)
- }
- }
+ private[sql] var sessionFunctionKindsProvider: () =>
Seq[SessionFunctionKind] =
Review Comment:
test comment
--
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]