linhongliu-db commented on a change in pull request #34546:
URL: https://github.com/apache/spark/pull/34546#discussion_r747208092
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -204,11 +214,8 @@ class Analyzer(override val catalogManager: CatalogManager)
}
override def execute(plan: LogicalPlan): LogicalPlan = {
- AnalysisContext.reset()
- try {
+ AnalysisContext.withNewAnalysisContext {
executeSameContext(plan)
- } finally {
- AnalysisContext.reset()
Review comment:
The rule `ResolveEncodersInUDF` will call `analyzer. execute()` again,
the AnalysisContext will be messed up after that.
--
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]