[
https://issues.apache.org/jira/browse/IMPALA-15004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143337#comment-18143337
]
ASF subversion and git services commented on IMPALA-15004:
----------------------------------------------------------
Commit 59eccbc101544399c5b150fd7189d08f53348e72 in impala's branch
refs/heads/master from Mihaly Szjatinya
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=59eccbc101 ]
IMPALA-15775: Prefer HMS stats over Puffin stats of the same snapshot
When an Iceberg table has both HMS and Puffin NDV stats for a column,
PuffinStatsLoader compares the snapshot stored for the column in the
'impala.computeStatsSnapshotIds' table property with the snapshot of
the Puffin blob. IMPALA-14261 switched this comparison from timestamps
to snapshot ids and used a strict "more recent" check, so when both
stats belong to the same snapshot, the Puffin stats were used. Before
that, the check was 'hmsStatsTimestampMs_ >= snapshotTs', i.e. HMS
stats won the tie, as the comment of hmsHasMoreRecentStats() still
says.
As a result, HMS stats of the current snapshot were ignored whenever
Puffin stats existed for the same snapshot, e.g. a manual
ALTER TABLE ... SET COLUMN STATS after COMPUTE STATS had no effect.
This patch makes hmsHasMoreRecentStats() return true if the HMS and
Puffin stats belong to the same snapshot, and documents the tie rule.
This is needed for IMPALA-15004, where COMPUTE STATS writes both HMS
and Puffin stats for the same snapshot.
Testing:
- Extended test_stats_before_and_after_HMS_stats with a column whose
HMS and Puffin stats belong to the same snapshot.
Change-Id: I829653dcb77e930a655187446496bbbe7ec5e81f
Assisted-by: Claude Opus 4.8 (GitHub Copilot)
Reviewed-on: https://gerrit.cloudera.org/25412
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Puffin stats writer for Iceberg tables
> --------------------------------------
>
> Key: IMPALA-15004
> URL: https://issues.apache.org/jira/browse/IMPALA-15004
> Project: IMPALA
> Issue Type: New Feature
> Reporter: Zoltán Borók-Nagy
> Assignee: Mihaly Szjatinya
> Priority: Major
> Labels: impala-iceberg, impala-iceberg-active-backlog
>
> Currently COMPUTE STATS store column statistics only in HMS.
> Iceberg has Puffin files for this purpose, but currently there's only a
> single blob type (Apache Theta sketches) we can store that only supports NDV.
> Impala should comply to Iceberg's standards and write Puffin files. The stats
> that cannot be stored in well-known Iceberg Puffin blob types could be stored
> in custom Impala blobs. That way all statistics information could be
> retrieved from a single place.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]