Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Jan 23, 2024

Resolves #284

@HonahX HonahX added this to the PyIceberg 0.6.0 release milestone Jan 25, 2024
Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

Thanks for the great work! @Fokko. It looks good. I left some comments and questions

type=ListType(
element_id=2,
element_type=ListType(
element_id=3,
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, did you manually format the schema in this style or the make lint did the job? This looks nice, especially in case of multi-level nested schema 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

else:
return self.new_schema.find_field(field_id).field_type

def field(self, field: NestedField, field_partner: Optional[int], field_result: bool) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def field(self, field: NestedField, field_partner: Optional[int], field_result: bool) -> bool:
def field(self, field: NestedField, partner_id: Optional[int], field_result: bool) -> bool:

Shall we name the second argument as partner_id to better reveal its content? We already did this in schema and struct. Same applied for *_partner arguments below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like it, thanks for the suggestion

Copy link
Contributor

@HonahX HonahX left a comment

Choose a reason for hiding this comment

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

Thanks @Fokko. LGTM!

@Fokko Fokko merged commit cd7fb50 into apache:main Jan 26, 2024
@Fokko Fokko deleted the fd-add-name-mapping branch January 26, 2024 13:36
@Fokko
Copy link
Contributor Author

Fokko commented Jan 26, 2024

Thanks for the review @HonahX

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.

Add unionByName visitor to update schema

2 participants