Background
#370 implements column-level ALTER TABLE. Its RenameColumn path (TableSchema::apply_changes) rewrites column references in primary_keys, bucket-key, and sequence.field — case 1 of Java SchemaManager.applyRenameColumnsToOptions.
It does not yet rewrite field-scoped options whose key embeds the column name. Java handles two more cases:
- case 2 — key =
fields.<col>.<suffix>, value has no column name: aggregate-function, ignore-retract, distinct, list-agg-delimiter.
- case 3 — key and value both contain column names:
fields.<cols>.sequence-group, fields.<cols>.nested-key.
Impact
After a rename, such options still point at the old column name and are silently persisted. This is already latent for partial-update tables on main (spec/partial_update.rs supports fields.<col>.sequence-group / fields.<col>.aggregate-function): renaming a column carrying these leaves a stale key. It also composes with merge-engine=aggregation (#340), where a renamed aggregation value column would fall back to the default aggregator/delimiter at read time.
Proposed fix
Port case 2 and case 3 of Java applyRenameColumnsToOptions into the Rust RenameColumn handling, with tests covering rename of columns carrying fields.<col>.* options.
References
Background
#370 implements column-level ALTER TABLE. Its
RenameColumnpath (TableSchema::apply_changes) rewrites column references inprimary_keys,bucket-key, andsequence.field— case 1 of JavaSchemaManager.applyRenameColumnsToOptions.It does not yet rewrite field-scoped options whose key embeds the column name. Java handles two more cases:
fields.<col>.<suffix>, value has no column name:aggregate-function,ignore-retract,distinct,list-agg-delimiter.fields.<cols>.sequence-group,fields.<cols>.nested-key.Impact
After a rename, such options still point at the old column name and are silently persisted. This is already latent for partial-update tables on
main(spec/partial_update.rssupportsfields.<col>.sequence-group/fields.<col>.aggregate-function): renaming a column carrying these leaves a stale key. It also composes withmerge-engine=aggregation(#340), where a renamed aggregation value column would fall back to the default aggregator/delimiter at read time.Proposed fix
Port case 2 and case 3 of Java
applyRenameColumnsToOptionsinto the RustRenameColumnhandling, with tests covering rename of columns carryingfields.<col>.*options.References
SchemaManager.applyRenameColumnsToOptions