Skip to content
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

Core: Refactor variants to enable moving interfaces to API module #12167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rdblue
Copy link
Contributor

@rdblue rdblue commented Feb 4, 2025

This refactors the existing Variant class structure to avoid breaking changes when the Variant interfaces are moved to iceberg-api. This requires:

  • PhysicalType should not be a static class in Variants, which will not move
  • VariantMetadata should not extend Variants.Serialized, which should not be exposed

This also adds writeTo and sizeInBytes to VariantMetadata to be able to serialize back to a ByteBuffer without Serialized.

int sizeInBytes();

/**
* Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth clarifying that this method should return how many bytes were written to the buffer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants