Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19002 )
Change subject: IMPALA-11482: Alter Table Execute Rollback for Iceberg tables. ...................................................................... IMPALA-11482: Alter Table Execute Rollback for Iceberg tables. Iceberg table modifications cause new table snapshots to be created; these snapshots represent an earlier version of the table. The Iceberg API provides a way to rollback the table to a previous snapshot. This change adds the ability to execute a rollback on Iceberg tables using the following statements: - ALTER TABLE <tbl> EXECUTE ROLLBACK(<snapshot id>) - ALTER TABLE <tbl> EXECUTE ROLLBACK('<timestamp>') The latter form of the command rolls back to the most recent snapshot that has a creation timestamp that is older than the specified timestamp. Note that when a table is rolled back to a snapshot, a new snapshot is created with the same snapshot id, but with a new creation timestamp. Testing: - Added analysis unit tests. - Added e2e tests. - Converted test_time_travel to use get_snapshots() from iceberg_util. - Add a utility class to allow pytests to create tables with various iceberg catalogs. Change-Id: Ic74913d3b81103949ffb5eef7cc936303494f8b9 Reviewed-on: http://gerrit.cloudera.org:8080/19002 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- M common/thrift/JniCatalog.thrift M fe/src/main/cup/sql-parser.cup A fe/src/main/java/org/apache/impala/analysis/AlterTableExecuteExpireSnapshotsStmt.java A fe/src/main/java/org/apache/impala/analysis/AlterTableExecuteRollbackStmt.java M fe/src/main/java/org/apache/impala/analysis/AlterTableExecuteStmt.java M fe/src/main/java/org/apache/impala/catalog/FeFsTable.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/main/java/org/apache/impala/service/IcebergCatalogOpExecutor.java M fe/src/main/jflex/sql-scanner.flex M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java A testdata/workloads/functional-query/queries/QueryTest/iceberg-rollback-negative.test M tests/custom_cluster/test_events_custom_configs.py M tests/query_test/test_iceberg.py M tests/util/iceberg_util.py 14 files changed, 675 insertions(+), 202 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/19002 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ic74913d3b81103949ffb5eef7cc936303494f8b9 Gerrit-Change-Number: 19002 Gerrit-PatchSet: 13 Gerrit-Owner: Andrew Sherman <asher...@cloudera.com> Gerrit-Reviewer: Andrew Sherman <asher...@cloudera.com> Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com> Gerrit-Reviewer: Gergely Fürnstáhl <gfurnst...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Tamas Mate <tma...@apache.org> Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>