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

name mapping serde #740

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

name mapping serde #740

wants to merge 1 commit into from

Conversation

barronw
Copy link
Contributor

@barronw barronw commented Nov 28, 2024

Closes #723.

#[serde(rename_all = "kebab-case")]
pub struct MappedField {
#[serde(skip_serializing_if = "Option::is_none")]
pub field_id: Option<i32>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Fokko I noticed that pyiceberg has this field as required instead of optional (reference), but the spec says that tables may omit this field (reference).

Fields that exist in imported files but not in the Iceberg schema may omit field-id.

@@ -20,6 +20,7 @@
mod datatypes;
mod manifest;
mod manifest_list;
mod name_mapping;
Copy link
Contributor Author

@barronw barronw Nov 28, 2024

Choose a reason for hiding this comment

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

Please let me know if I should also expose the name mapping in TableMetadata and Table (as pyiceberg does).

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.

Able to parse name-mapping into a recusive structure.
1 participant