tangrizzly commented on code in PR #53941:
URL: https://github.com/apache/spark/pull/53941#discussion_r2733641531


##########
sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/graph/SqlGraphRegistrationContext.scala:
##########
@@ -529,8 +532,12 @@ class SqlGraphRegistrationContext(
   }
 
   private object SetCatalogCommandHandler {
-    def handle(setCatalogCommand: SetCatalogCommand): Unit = {
-      context.setCurrentCatalog(setCatalogCommand.catalogName)
+    def handle(setCatalogCommand: SetCatalogCommand, spark: SparkSession): 
Unit = {
+      // Analyze unresolved references in the expression of the SET CATALOG 
command.
+      // before handling the command.
+      val analyzedSetCatalogCommand = 
spark.sessionState.analyzer.execute(setCatalogCommand)
+        .asInstanceOf[SetCatalogCommand]

Review Comment:
   Analyzing UnresolvedAttribute from the expression here before getting the 
catalog name to set current catalog. cc: @dtenedor 



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