Skip to content

feat: add an AddFieldsAction to transaction #1175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

cmcarthur
Copy link

@cmcarthur cmcarthur commented Apr 7, 2025

Which issue does this PR close?

What changes are included in this PR?

  • Adds a new AddFieldsAction which represents an addition of new fields to an existing table
  • Adds a new method to Transaction add_fields which generates an AddFieldsAction
  • When applied, the AddFieldsAction will register a new schema with the addition of the new fields, and set the current schema version to (schema + 1). (I am not highly confident that this is the right way to manage the schema id, though I've verified that it works in my testing. Is there a better way to mark the next schema version as the current one? Is this necessary?)

Are these changes tested?

Added tests:

Unit: in crates/iceberg/src/transaction/add_field.rs
Integration: in crates/integration_tests/tests/shared_tests/add_field_test.rs

@cmcarthur
Copy link
Author

This was opened against a non-updated main, I will close and re-open.

@cmcarthur cmcarthur closed this Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement an AddFields operation
1 participant