dtenedor commented on code in PR #36445:
URL: https://github.com/apache/spark/pull/36445#discussion_r871714091


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -287,6 +287,7 @@ class Analyzer(override val catalogManager: CatalogManager)
       ResolveFieldNameAndPosition ::
       AddMetadataColumns ::
       DeduplicateRelations ::
+      ResolveDefaultColumns(this, v1SessionCatalog) ::

Review Comment:
   The `resolveMergeExprOrFail` method was returning errors on the DEFAULT 
column attribute reference. Moving the rule earlier processed the DEFAULT 
column before that.
   
   However, I am able to just update that method to skip errors for DEFAULT 
column references anyway. That works because all DEFAULT column references 
should either get replaced by the `ResolveDefaultColumns` rule, or otherwise 
return some kind of `not implemented` error (e.g. may not appear in the merge 
condition).
   
   <img width="952" alt="image" 
src="https://user-images.githubusercontent.com/99207096/168148277-109c238e-afa0-48ec-b75f-a1594f5c9f95.png";>
   



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