aokolnychyi commented on code in PR #50701: URL: https://github.com/apache/spark/pull/50701#discussion_r2076037147
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala: ########## @@ -3994,10 +3994,45 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor c.markAsAnalyzed(AnalysisContext.get) case c: KeepAnalyzedQuery if c.resolved => c.storeAnalyzedQuery() - case p: LogicalPlan if p.resolved => - p.transformAllExpressionsWithPruning(_.containsPattern(ANALYSIS_AWARE_EXPRESSION)) { - case e: AnalysisAwareExpression[_] => e.markAsAnalyzed() + case c: CreateTable if c.resolved => + c.copy(columns = storeDefaultForColumnDefinition(c.columns)) + case r: ReplaceTable if r.resolved => + r.copy(columns = storeDefaultForColumnDefinition(r.columns)) + case a: AddColumns => + // Wrap analysis errors for default values in a more user-friendly message. + a.columnsToAdd.foreach { c => Review Comment: My gut tells me to look for another way and keep this rule generic, as it was before. Let me think. -- 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