cloud-fan commented on code in PR #49942:
URL: https://github.com/apache/spark/pull/49942#discussion_r1955421786


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/ColumnDefinition.scala:
##########
@@ -75,7 +75,7 @@ case class ColumnDefinition(
       // For v1 CREATE TABLE command, we will resolve and execute the default 
value expression later
       // in the rule `DataSourceAnalysis`. We just need to put the default 
value SQL string here.
       metadataBuilder.putString(CURRENT_DEFAULT_COLUMN_METADATA_KEY, 
default.originalSQL)
-      metadataBuilder.putString(EXISTS_DEFAULT_COLUMN_METADATA_KEY, 
default.originalSQL)
+      metadataBuilder.putString(EXISTS_DEFAULT_COLUMN_METADATA_KEY, 
default.child.sql)

Review Comment:
   When we convert v2 CREATE TABLE command to v1, `ColumnDefinition` is only 
resolved but not constant-folded (still in the analyzer phase). 



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

Reply via email to