yuqi1129 opened a new pull request, #14286:
URL: https://github.com/apache/gravitino/pull/14286

   ### What changes were proposed in this pull request?
   
   When `alterTable` stores a column rename or drop whose name matches no 
stored column exactly, it maps the change to the stored column that matches it 
case-insensitively, if exactly one does (`alignNameChangesWithStoredColumns`).
   
   ### Why are the changes needed?
   
   Catalogs such as MySQL match column names case-insensitively but report 
case-sensitive names. A rename of `col` for a column stored as `Col` succeeded 
in the catalog, but Gravitino stored it as a drop of `Col` plus an add, so the 
column got a new id and lost its tags.
   
   Fixes #14283
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New 
`TestTableOperationDispatcher.testAlterTableKeepsColumnIdWhenRenameDiffersInCase`
 (fails without the fix) and `testAlignNameChangesWithStoredColumns`. 
`TestTableOperationDispatcher` and `TestTableNormalizeDispatcher` pass.
   


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