Skip to content

Conversation

@deniskuzZ
Copy link
Member

@deniskuzZ deniskuzZ commented Dec 13, 2025

What changes were proposed in this pull request?

Skip updating basic partition statistics in HMS for non-native, self-contained tables.

Why are the changes needed?

Bug-fix

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added test-case for partitioned table

@deniskuzZ deniskuzZ changed the title HIVE-29361: BasicStatsTask.aggregateStats tries to update partition stats in HMS for non-native tables HIVE-29361: BasicStatsTask.aggregateStats shouldn't update partition stats in HMS for non-native tables Dec 13, 2025
@glapark
Copy link
Contributor

glapark commented Dec 14, 2025

I tested the patch and found that the warning is no longer printed.

@Aggarwal-Raghav
Copy link
Contributor

LGTM +1 (non-binding)

Small doubt, somewhat outside the scope of PR. When hive.iceberg.stats.source=iceberg, the basic table stats (numRows, totalSize, numFiles which are present in desc formatted output) are read from puffin files or from HMS?

If hive.iceberg.stats.source=metastore, then where per-partition stats be present? As per javadoc in org.apache.hadoop.hive.ql.metadata.HiveStorageHandler#supportsPartitioning()

Any partitioning scheme provided via the standard HiveQL syntax will be honored but stored in someplace
other than HMS, depending on the storage handler implementation.

@deniskuzZ
Copy link
Member Author

deniskuzZ commented Dec 15, 2025

Small doubt, somewhat outside the scope of PR. When hive.iceberg.stats.source=iceberg, the basic table stats (numRows, totalSize, numFiles which are present in desc formatted output) are read from puffin files or from HMS?

column stats from Puffin, basic stats from iceberg metadata

If hive.iceberg.stats.source=metastore, then where per-partition stats be present? As per javadoc in org.apache.hadoop.hive.ql.metadata.HiveStorageHandler#supportsPartitioning()

It's not even supported, since HMS is unaware of partitioning

@deniskuzZ deniskuzZ requested a review from difin December 15, 2025 15:12
@sonarqubecloud
Copy link

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.

4 participants