dtenedor commented on code in PR #36778:
URL: https://github.com/apache/spark/pull/36778#discussion_r905247002
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala:
##########
@@ -203,6 +203,14 @@ private[sql] object CatalogV2Util {
})
}
+ case update: UpdateColumnDefaultValue =>
+ replace(schema, update.fieldNames, field =>
+ if (update.newDefaultValue().nonEmpty) {
Review Comment:
Good question. 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. I added this in a comment here to help explain.
--
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]