Skip to content

fix: add metadata_properties to _construct_parameters when update hive table #2013

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

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

Conversation

kadai0308
Copy link

@kadai0308 kadai0308 commented May 18, 2025

Closes: #2010

Rationale for this change

This change adds metadata_properties to the _construct_parameters function to ensure metadata properties are included in the parameters.
I'm not entirely confident about the changes, so please let me know if my understanding is correct—if so, I’ll proceed to add tests.
Thanks you!

Are these changes tested?

Not yet.

Are there any user-facing changes?

Not sure.

@kadai0308 kadai0308 force-pushed the fix/hive-client-does-not-update-table-properties branch from fa27421 to df294d1 Compare May 18, 2025 13:50
Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

@kadai0308 thanks for working on this. Would it be possible to add a test? We have Hive container running that we use for tests. This way we don't break it in the future.

Maybe we can add a test somewhere here:

def test_table_properties(catalog: Catalog) -> None:

The session_catalog_hive is a HiveCatalog.

@@ -541,6 +548,7 @@ def commit_table(
hive_table.parameters = _construct_parameters(
metadata_location=updated_staged_table.metadata_location,
previous_metadata_location=current_table.metadata_location,
metadata_properties=updated_staged_table.properties,
Copy link
Contributor

Choose a reason for hiding this comment

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

We also invoke this at line 363, should we also pass in the properties there?

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.

[bug] hive client does not update table properties
2 participants