You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/11 05:15:12 UTC
[GitHub] [spark] linhongliu-db commented on a change in pull request #34546: [SPARK-37702][SQL] Use AnalysisContext to track referred temp functions
linhongliu-db commented on a change in pull request #34546:
URL: https://github.com/apache/spark/pull/34546#discussion_r747207463
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -232,11 +242,16 @@ case class AlterViewAsCommand(
override def childrenToAnalyze: Seq[LogicalPlan] = query :: Nil
+ override def applyAnalysisContext(analysisContext: AnalysisContext): AnalysisOnlyCommand = {
+ // Collect the referred temporary functions from AnalysisContext
+ copy(referredTempFunctions = analysisContext.referredTempFunctionNames.toSeq)
+ }
+
def markAsAnalyzed(): LogicalPlan = copy(isAnalyzed = true)
Review comment:
i'm thinking about combining them to
```
def markAsAnalyzed(analysisContext: AnalysisContext): LogicalPlan = {
copy(
isAnalyzed = true,
referredTempFunctions = analysisContext.referredTempFunctionNames.toSeq)
}
```
cannot decide which is better
--
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-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org