dusantism-db commented on code in PR #49445:
URL: https://github.com/apache/spark/pull/49445#discussion_r1926712371


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveCatalogs.scala:
##########
@@ -73,28 +94,39 @@ class ResolveCatalogs(val catalogManager: CatalogManager)
     }
   }
 
-  private def resolveVariableName(nameParts: Seq[String]): ResolvedIdentifier 
= {
-    def ident: Identifier = 
Identifier.of(Array(CatalogManager.SESSION_NAMESPACE), nameParts.last)
-    if (nameParts.length == 1) {
+  private def resolveCreateVariableName(nameParts: Seq[String]): 
ResolvedIdentifier = {
+    val ident = SqlScriptingVariableManager.get()
+      .getOrElse(catalogManager.tempVariableManager)
+      .createIdentifier(nameParts.last)
+
+    resolveVariableName(nameParts, ident)
+  }
+
+  private def resolveDropVariableName(nameParts: Seq[String]): 
ResolvedIdentifier = {
+    // Only session variables can be dropped, so 
catalogManager.scriptingLocalVariableManager
+    // is not checked in the case of DropVariable.

Review Comment:
   Yes, DROP will never consider local variables at all. It only works on 
session variables, per specification.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to