ganeshashree commented on code in PR #60213:
URL: https://github.com/apache/spark/pull/60213#discussion_r4563771873


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -306,13 +309,20 @@ object AnalysisContext {
       // and must be recorded there. Sharing the caller's set records it; a 
nested view, by
       // contrast, stores its own and so is reset. The exception is a SQL 
function body under
       // creation, which must not inherit the dependencies of the functions it 
calls; see
-      // `shareIdentifierVariablesWithNestedSQLFunctions`.
+      // `shareTempReferencesWithNestedSQLFunctions`.
       referredTempVariableNamesUnderIdentifier =
-        if (originContext.shareIdentifierVariablesWithNestedSQLFunctions) {
+        if (originContext.shareTempReferencesWithNestedSQLFunctions) {
           originContext.referredTempVariableNamesUnderIdentifier
         } else {
           mutable.LinkedHashSet.empty
         },
+      // The same holds for the temporary functions the body binds.
+      referredTempFunctionNames =
+        if (originContext.shareTempReferencesWithNestedSQLFunctions) {
+          originContext.referredTempFunctionNames

Review Comment:
   Done.



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