TwinklerG opened a new pull request, #2431:
URL: https://github.com/apache/iceberg-rust/pull/2431

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #2119 #697.
   
   ## What changes are included in this PR?
   
   <!--
   Provide a summary of the modifications in this PR. List the main changes 
such as new features, bug fixes, refactoring, or any other updates.
   -->
   
   Add schema_update function and UpdateSchemaAction to support schema 
evolution operations on Iceberg tables.
   
   - Define `SchemaOperation` enum supporting Add, Update, Delete, Rename, and 
Move column operations
   - Define operation structs: `AddColumn`, `UpdateColumn`, `DeleteColumn`, 
`RenameColumn`, `MoveColumn`
   - Implement `schema_update()` function that validates and applies a list of 
schema operations to produce a new schema
   - Implement `assign_fresh_ids()` to reassign field IDs for newly added 
nested types(May be replaced with `ReassignFieldIds`, but simpler)
   - Implement `ApplyChangesVisitor` (using `SchemaVisitor` trait) to apply 
deletes, updates, adds, and moves to the schema tree
   
   Some helper additions
   
   - Add `Type::is_list()`, `Type::is_map()` convenience methods
   - Add `NestedField::list_required_element()`, `list_optional_element()`, 
`of_type()`, `with_name()`
   - Add `ListType::optional()`, `ListType::required()` convenience constructors
   - Fix doc typo: `Creates  decimal` -> `Creates decimal`
   
   ## Are these changes tested?
   
   <!--
   Specify what test covers (unit test, integration test, etc.).
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   Yes. Besides, I add some complex test cases which are ported from 
iceberg-java, a few of them to be implemented.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to