gengliangwang commented on code in PR #36778:
URL: https://github.com/apache/spark/pull/36778#discussion_r905432456
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala:
##########
@@ -203,6 +203,18 @@ private[sql] object CatalogV2Util {
})
}
+ case update: UpdateColumnDefaultValue =>
+ replace(schema, update.fieldNames, field =>
+ // The new DEFAULT value string will be non-empty for any DDL
commands that set the
+ // default value, such as "ALTER TABLE t ALTER COLUMN c SET
DEFAULT ..." (this is
+ // enforced by the parser). On the other hand, commands that drop
the default value such
+ // as "ALTER TABLE t ALTER COLUMN c DROP DEFAULT" will set this
string to empty.
Review Comment:
How about testing "DROP DEFAULT" as well? I will merge this one after the
new case added
--
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]