danny0405 commented on code in PR #19733:
URL: https://github.com/apache/hudi/pull/19733#discussion_r3859310193


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/AlterTableCommand.scala:
##########
@@ -194,6 +195,7 @@ case class AlterTableCommand(table: CatalogTable, changes: 
Seq[TableChange], cha
     val tableComment = if (propKeys.contains(TableCatalog.PROP_COMMENT)) None 
else table.comment
     val newProperties = table.properties.filter { case (k, _) => 
!propKeys.contains(k) }
     val newTable = table.copy(properties = newProperties, comment = 
tableComment)
+    deleteHoodieTableConfigs(sparkSession, propKeys)

Review Comment:
   **[P1] Normalize aliases on both sides before deleting**
   
   The catalog removal above uses the requested spelling verbatim, but this 
call canonicalizes SQL aliases before deleting from `hoodie.properties`. If the 
catalog contains the supported legacy alias `preCombineField` and the user 
unsets `orderingFields`, `newProperties` leaves `preCombineField` in the 
catalog while this path maps `orderingFields` to `hoodie.table.ordering.fields` 
and deletes the persisted config. That recreates the catalog/file divergence 
this PR is meant to fix. Please resolve aliases to one canonical identity when 
deciding what to remove from both stores.



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

Reply via email to