Skip to content

HIVE-28765: Iceberg: Incorrect partition statistics on time travel + partition evolution #5748

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 2 commits into
base: master
Choose a base branch
from

Conversation

okumin
Copy link
Contributor

@okumin okumin commented Apr 6, 2025

What changes were proposed in this pull request?

https://issues.apache.org/jira/browse/HIVE-28765

We use not partition stats but table stats when we access a complicated table with tagging or branching.

Why are the changes needed?

We would like to improve the query plan for a time-travel read with tagging and branching.

Does this PR introduce any user-facing change?

No

Is the change a dependency upgrade?

No

How was this patch tested?

Updated an existing query file.

@okumin okumin force-pushed the HIVE-28765-partition-snapshot branch from 01a4117 to e11c40d Compare April 12, 2025 05:08
@@ -2149,12 +2149,16 @@ public List<Partition> getPartitions(org.apache.hadoop.hive.ql.metadata.Table hm
}

public boolean isPartitioned(org.apache.hadoop.hive.ql.metadata.Table hmsTable) {
if ((hmsTable.getAsOfVersion() != null || hmsTable.getAsOfTimestamp() != null) &&
hasUndergonePartitionEvolution(hmsTable) ||
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 used IcebergTableUtil.getTableSnapshot to avoid duplicate knowledge of the snapshot configurations. I can move it back to the original style if we prefer it.

@okumin okumin changed the title [WIP] HIVE-28765: Iceberg: Incorrect partition statistics on time travel + partition evolution HIVE-28765: Iceberg: Incorrect partition statistics on time travel + partition evolution Apr 12, 2025
@okumin okumin marked this pull request as ready for review April 12, 2025 07:34
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