TheR1sing3un opened a new issue, #368:
URL: https://github.com/apache/paimon-rust/issues/368

   ### Problem
   
   `TableSchema::apply_changes` currently only handles `SetOption` / 
`RemoveOption`; all column-level `SchemaChange`s (add/rename/drop column, 
update column type/nullability/comment/position, update comment) return 
`Unsupported`. As a result `FileSystemCatalog::alter_table` cannot evolve a 
table's columns, and `RESTCatalog::alter_table` is entirely unimplemented.
   
   In addition, the `SchemaChange` JSON does not match Java Paimon's wire 
format (Java uses an `@JsonTypeInfo` discriminator `action` with `fieldNames` 
arrays, `newDataType`/`keepNullability`, `referenceFieldName`, and 
FIRST/AFTER/BEFORE/LAST moves), so a REST `alter_table` could never 
interoperate with a Java server.
   
   ### Proposal
   
   - Implement all column-level changes in `apply_changes` for top-level 
columns, mirroring Java `SchemaManager.generateTableSchema` (field-id 
allocation, move semantics, primary/partition-key guards).
   - Align the `SchemaChange` JSON wire format with Java Paimon.
   - Add `AlterTableRequest` + `RESTApi::alter_table` and implement 
`RESTCatalog::alter_table`.
   
   ### Out of scope (follow-ups)
   
   - Nested struct field paths (only top-level columns for now).
   - `UpdateColumnType` cast-compatibility validation (lenient replace for now).
   - Java's `dropPrimaryKey` / `updateColumnDefaultValue` variants.
   


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