davidm-db commented on code in PR #49993:
URL: https://github.com/apache/spark/pull/49993#discussion_r1961330102


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -1670,6 +1683,9 @@ class Analyzer(override val catalogManager: 
CatalogManager) extends RuleExecutor
       case s: Sort if !s.resolved || s.missingInput.nonEmpty =>
         resolveReferencesInSort(s)
 
+      // Pass for Execute Immediate as arguments will be resolved by 
[[SubstituteExecuteImmediate]].

Review Comment:
   For my knowledge, can you clarify on this? 
   IIUC, this comment in the code refers to the parameters specified in the 
USING clause in EXECUTE IMMEDIATE, i.e. their resolution in the query. In the 
USING clause we have `<expr> AS <alias>` syntax that can basically rename any 
session var and we should be able to use local vars here as well.
   How would this work through the regular resolution path? Am I missing 
something?



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