TheR1sing3un opened a new pull request, #370: URL: https://github.com/apache/paimon-rust/pull/370
### Purpose Linked issue: close #368 Implement column-level `alter table` on both `FileSystemCatalog` and `RESTCatalog`, and align the `SchemaChange` JSON wire format with Java Paimon. ### Brief change log - `TableSchema::apply_changes`: implement add / rename / drop column, update column type / nullability / comment / position, and update table comment, mirroring Java `SchemaManager.generateTableSchema` (field-id allocation, FIRST/AFTER/BEFORE/LAST moves, primary/partition-key guards). Operates on top-level columns; reuses `ColumnAlreadyExist` / `ColumnNotExist`. The method keeps its single-argument signature — the catalog fills in the table name on column errors. - Align `SchemaChange` JSON with Java Paimon: internally tagged by `action`, with `fieldNames` arrays, `comment` / `newDataType` / `keepNullability` / `newNullability` / `newComment` fields, `referenceFieldName` move anchors, and FIRST/AFTER/BEFORE/LAST move types. - Add `AlterTableRequest` + `RESTApi::alter_table`; implement `RESTCatalog::alter_table`. ### Tests - New unit tests in `spec::schema_change` (Java-format (de)serialization), `spec::schema`, and `catalog::filesystem` (add+move, rename syncing PK refs, drop rejecting PK columns, type/nullability/comment updates, reposition, and the `ColumnAlreadyExist` / `ColumnNotExist` / `TableNotExist` error paths). - Existing `paimon-datafusion` alter-table tests pass. ### API and Format Changes the `SchemaChange` **JSON wire format**. This is effectively a fix: the previous format was incompatible with Java Paimon, and REST `alter_table` was never implemented, so no working interaction is broken. No public Rust API **signature** change (`apply_changes` keeps its arity). ### Documentation None required. #### Out of scope (follow-ups) Nested struct field paths; `UpdateColumnType` cast-compatibility validation; Java's `dropPrimaryKey` / `updateColumnDefaultValue`. -- 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]
