davidm-db commented on code in PR #49445: URL: https://github.com/apache/spark/pull/49445#discussion_r1930167897
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala: ########## @@ -208,7 +212,16 @@ object AnalysisContext { originContext.relationCache, viewDesc.viewReferredTempViewNames, mutable.Set(viewDesc.viewReferredTempFunctionNames: _*), - viewDesc.viewReferredTempVariableNames) + viewDesc.viewReferredTempVariableNames, + isExecuteImmediate = originContext.isExecuteImmediate) + set(context) + try f finally { set(originContext) } + } + + def withExecuteImmediateContext[A](isExecuteImmediate: Boolean)(f: => A): A = { Review Comment: yeah, it's also strange a bit from semantic perspective - having something called `withExecuteImmediateContext` and `isExecuteImmedate = false` within it looks really unexpected. -- 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