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


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala:
##########
@@ -304,12 +304,13 @@ case class AlterTableSetPropertiesCommand(
   override def run(sparkSession: SparkSession): Seq[Row] = {
     val catalog = sparkSession.sessionState.catalog
     val table = catalog.getTableRawMetadata(tableName)
-    // This overrides old properties and update the comment parameter of 
CatalogTable
-    // with the newly added/modified comment since CatalogTable also holds 
comment as its
-    // direct property.
+    // This overrides old properties and updates the comment and collation 
parameters of
+    // CatalogTable with the newly added/modified comment and collation since 
CatalogTable
+    // also holds comment and collation as its direct properties.
     val newTable = table.copy(
       properties = table.properties ++ properties,
-      comment = 
properties.get(TableCatalog.PROP_COMMENT).orElse(table.comment))
+      comment = 
properties.get(TableCatalog.PROP_COMMENT).orElse(table.comment),
+      collation = 
properties.get(TableCatalog.PROP_COLLATION).orElse(table.collation))

Review Comment:
   how can we hit this code path? People use SET TBLPROPERTIES command and 
explicitly set the `collation` property?



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