Skip to content

API: Deprecate NestedType.of in favor of builder - #12227

Merged
nastra merged 5 commits into
apache:mainfrom
rdblue:deprecate-nested-field-of
Feb 14, 2025
Merged

API: Deprecate NestedType.of in favor of builder#12227
nastra merged 5 commits into
apache:mainfrom
rdblue:deprecate-nested-field-of

Conversation

@rdblue

@rdblue rdblue commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

This is a follow up to #12211. While adding support for default values in UpdateSchema, many of the changes were to use the NestedField builder's copy constructor, from(NestedField), so that field defaults are not dropped. Dropping defaults is easy to do when using the of factory method that was previously used to copy fields.

This PR deprecates that factory method and removes deprecated uses of NestedField methods.

Comment thread orc/src/main/java/org/apache/iceberg/orc/OrcToIcebergVisitor.java
Comment thread api/src/main/java/org/apache/iceberg/types/Types.java Outdated

@nastra nastra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdblue I believe you meant to also push changes that include a builder() method. Also I think it would be good to update all of the usages in SchemaUpdate to the non-deprecated methods

@rdblue

rdblue commented Feb 12, 2025

Copy link
Copy Markdown
Contributor Author

Also I think it would be good to update all of the usages in SchemaUpdate to the non-deprecated methods

That's done in #12211. This will be rebased and merged after that one goes in.

@nastra

nastra commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

LGTM, thanks @rdblue

@nastra
nastra merged commit b78d36a into apache:main Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants