Search before asking
Paimon version
master (1.5-SNAPSHOT)
Compute Engine
Any engine issuing ALTER TABLE ... RENAME COLUMN.
Minimal reproduce step
Renaming a column rewrites the field-referencing table options so they follow the new name. SchemaManagerUtils.applyRenameColumnsToOptions mishandles three cases.
-
Nested renames are keyed by their root column. Rename a nested field such as metrics.value.f1 to f100 on a shredded MAP column that carries fields.metrics.map.storage-layout=shared-shredding. The option is relocated to fields.f100.map.storage-layout, so the still-named metrics column loses its shredding config and the option references a column that does not exist. Two nested renames under the same root throw IllegalStateException: Duplicate key from the toMap collector.
-
CSV option entries are split without trimming, while the canonical readers (bucket-key, sequence.field, clustering.columns, sequence-group) all trim. With bucket-key = 'a, b', renaming b to c fails to match the b entry, the value stays a, b, and the next commit aborts because validation trims to [a, b] and finds b gone.
-
clustering.columns (and its fallback key sink.clustering.by-columns) is not rewritten, so renaming a clustering column leaves the option pointing at the dropped name.
What doesn't meet your expectations?
After a rename, every field-referencing option should follow the new column name. Instead the options above are dropped, relocated to a non-existent column, crash the rename, or later abort a commit.
Anything else?
No response
Are you willing to submit a PR?
Search before asking
Paimon version
master (1.5-SNAPSHOT)
Compute Engine
Any engine issuing
ALTER TABLE ... RENAME COLUMN.Minimal reproduce step
Renaming a column rewrites the field-referencing table options so they follow the new name.
SchemaManagerUtils.applyRenameColumnsToOptionsmishandles three cases.Nested renames are keyed by their root column. Rename a nested field such as
metrics.value.f1tof100on a shredded MAP column that carriesfields.metrics.map.storage-layout=shared-shredding. The option is relocated tofields.f100.map.storage-layout, so the still-namedmetricscolumn loses its shredding config and the option references a column that does not exist. Two nested renames under the same root throwIllegalStateException: Duplicate keyfrom the toMap collector.CSV option entries are split without trimming, while the canonical readers (
bucket-key,sequence.field,clustering.columns, sequence-group) all trim. Withbucket-key = 'a, b', renamingbtocfails to match thebentry, the value staysa, b, and the next commit aborts because validation trims to[a, b]and findsbgone.clustering.columns(and its fallback keysink.clustering.by-columns) is not rewritten, so renaming a clustering column leaves the option pointing at the dropped name.What doesn't meet your expectations?
After a rename, every field-referencing option should follow the new column name. Instead the options above are dropped, relocated to a non-existent column, crash the rename, or later abort a commit.
Anything else?
No response
Are you willing to submit a PR?