You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/08/10 07:27:00 UTC
[jira] [Commented] (IMPALA-11362) Add expire snapshots functionality for Iceberg tables
[ https://issues.apache.org/jira/browse/IMPALA-11362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17577832#comment-17577832 ]
ASF subversion and git services commented on IMPALA-11362:
----------------------------------------------------------
Commit 896ce102522f28236beb0640fbf95ad95040899a in impala's branch refs/heads/master from Tamas Mate
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=896ce1025 ]
IMPALA-11362: Add expire snapshots functionality for Iceberg tables
Iceberg table modifications can create new table snapshots, these
snapshots can be used to access an earlier version of the table. During
the lifetime of a table the number of snapshots can accumulate and older
versions can become obsolete as well. Iceberg API provides a safe
solution to remove the snapshots that are not needed anymore, the
operation is called ExpireSnapshots.
This commit adds framework to execute Iceberg maintenance operation on
tables and implements the call of an expire snapshots operation. The
following statement becomes available for Iceberg tables:
- ALTER TABLE <tbl> EXECUTE expire_snapshots(<timestamp>)
ExpireSnapshots Iceberg API calls were meant to be chained, the calls
are expireSnapshotId, expireOlderThan and retainLast. SQL is less
suitable for chained calls, therefore this commit implements only the
expireOlderThan functionality. However, in this case the retainLast call
will fall back to its default value (1), this default can be configured
with TableProperties.MIN_SNAPSHOTS_TO_KEEP.
This commit also refactors the Iceberg e2e tests and introduces
ImpalaTestSuite for the common methods that are used in test which
compare snapshot versions in some way.
Testing:
- Added analysis unit tests.
- Added e2e tests.
Change-Id: Ideffee4964c18c85ca745bfb4eca08ec362416f3
Reviewed-on: http://gerrit.cloudera.org:8080/18688
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
> Add expire snapshots functionality for Iceberg tables
> -----------------------------------------------------
>
> Key: IMPALA-11362
> URL: https://issues.apache.org/jira/browse/IMPALA-11362
> Project: IMPALA
> Issue Type: New Feature
> Components: Frontend
> Affects Versions: Impala 4.1.0
> Reporter: Zoltán Borók-Nagy
> Assignee: Tamas Mate
> Priority: Major
> Labels: impala-iceberg
>
> We want to support the following table maintenance features:
> {noformat}
> ALTER TABLE test_table EXECUTE expire_snapshots("older_than", <timestamp-expr>);
> ALTER TABLE test_table EXECUTE expire_snapshots("retain_last", <integer-literal>);
> ALTER TABLE test_table EXECUTE expire_snapshots("snapshot_id", <integer-literal>);
> {noformat}
> They would invoke the corresponding Iceberg APIs, see:
> https://github.com/apache/iceberg/blob/master/api/src/main/java/org/apache/iceberg/actions/ExpireSnapshots.java
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org