Files
impala/testdata/workloads/functional-query/queries/QueryTest/iceberg-external.test
Daniel Vanko 3d22c7fe05 IMPALA-12209: Always include format-version in DESCRIBE FORMATTED and SHOW CREATE TABLE for Iceberg tables
HiveCatalog does not include format-version for Iceberg tables in the
table's parameters, therefore the output of SHOW CREATE TABLE may not
replicate the original table.
This patch makes sure to add it to both the SHOW CREATE TABLE and
DESCRIBE FORMATTED/EXTENDED output.

Additionally, adds ICEBERG_DEFAULT_FORMAT_VERSION variable to E2E
tests, deducting from IMPALA_ICEBERG_VERSION environment variable.

If Iceberg version is at least 1.4, default format-version is 2, before
1.4 it's 1. This way tests can work with multiple Iceberg versions.

Testing:
 * updated show-create-table.test and show-create-table-with-stats.test
   for Iceberg tables
 * added format-version checks to multiple DESCRIBE FORMATTED tests

Change-Id: I991edf408b24fa73e8a8abe64ac24929aeb8e2f8
Reviewed-on: http://gerrit.cloudera.org:8080/23514
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2025-11-24 21:48:17 +00:00

74 lines
1.7 KiB
Plaintext

====
---- QUERY
create table ice_hive_ext (i int)
stored by iceberg
tblproperties ('external.table.purge'='false');
insert into ice_hive_ext values (4);
---- DML_RESULTS: ice_hive_ext
4
---- TYPES
INT
====
---- QUERY
alter table ice_hive_ext add column j int;
select * from ice_hive_ext;
---- RESULTS
4,NULL
---- TYPES
INT,INT
====
---- QUERY
insert into ice_hive_ext values (5,5);
---- DML_RESULTS: ice_hive_ext
4,NULL
5,5
---- TYPES
INT,INT
====
---- QUERY
alter table ice_hive_ext set tblproperties ('external.table.purge'='true');
insert into ice_hive_ext values (6,6);
describe formatted ice_hive_ext
---- RESULTS: VERIFY_IS_SUBSET
'','format-version ','$ICEBERG_DEFAULT_FORMAT_VERSION '
'','external.table.purge','true '
---- TYPES
STRING,STRING,STRING
====
---- QUERY
create table ice_hadoop_tables_ext (i int)
stored by iceberg
tblproperties ('iceberg.catalog'='hadoop.tables', 'external.table.purge'='false');
insert into ice_hadoop_tables_ext values (4);
---- DML_RESULTS: ice_hadoop_tables_ext
4
---- TYPES
INT
====
---- QUERY
alter table ice_hadoop_tables_ext add column j int;
select * from ice_hadoop_tables_ext;
---- RESULTS
4,NULL
---- TYPES
INT,INT
====
---- QUERY
insert into ice_hadoop_tables_ext values (5,5);
---- DML_RESULTS: ice_hadoop_tables_ext
4,NULL
5,5
---- TYPES
INT,INT
====
---- QUERY
alter table ice_hadoop_tables_ext set tblproperties ('external.table.purge'='true');
insert into ice_hadoop_tables_ext values (6,6);
describe formatted ice_hadoop_tables_ext
---- RESULTS: VERIFY_IS_SUBSET
'','format-version ','$ICEBERG_DEFAULT_FORMAT_VERSION '
'','external.table.purge','true '
---- TYPES
STRING,STRING,STRING
====