IMPALA-12520: Create all Iceberg test tables under /test-warehouse

This patch modifies the creation of Iceberg tables in 5 testfiles.
Previously these tables were created outside of /test-warehouse which
could lead to issues, because we only clear the /test-warehouse
directory in bin/jenkins/release_cloud_resources.sh. This means tables
subsequent executions might see data from earlier runs.

Change-Id: I97ce512db052b6e7499187079a184c1525692592
Reviewed-on: http://gerrit.cloudera.org:8080/23188
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Zoltan Borok-Nagy <boroknagyz@cloudera.com>
This commit is contained in:
Daniel Vanko
2025-07-16 16:02:58 +02:00
committed by Zoltan Borok-Nagy
parent 2ad6f818a5
commit 6a97109551
5 changed files with 11 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ CREATE TABLE iceberg_hadoop_catalog(
)
STORED AS ICEBERG
TBLPROPERTIES('iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test');
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(event_time TIMESTAMP, register_time DATE);
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(message STRING, price DECIMAL(8,1));
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1: BIGINT, f2: BIGINT>);

View File

@@ -74,7 +74,7 @@ CREATE TABLE iceberg_hadoop_catalog(
)
STORED AS ICEBERG
TBLPROPERTIES('format-version'='1', 'iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test');
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(event_time TIMESTAMP, register_time DATE);
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(message STRING, price DECIMAL(8,1));
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1: BIGINT, f2: BIGINT>);

View File

@@ -74,7 +74,7 @@ CREATE TABLE iceberg_hadoop_catalog(
)
STORED AS ICEBERG
TBLPROPERTIES('format-version'='2', 'iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test');
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(event_time TIMESTAMP, register_time DATE);
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(message STRING, price DECIMAL(8,1));
ALTER TABLE iceberg_hadoop_catalog ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1: BIGINT, f2: BIGINT>);

View File

@@ -70,13 +70,13 @@ PARTITIONED BY SPEC
TRUNCATE(15, level)
)
STORED AS ICEBERG
LOCATION '$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE.iceberg_test_with_location'
LOCATION '$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE.iceberg_test_with_location'
TBLPROPERTIES('iceberg.catalog'='hadoop.tables');
CREATE EXTERNAL TABLE iceberg_hadoop_tbls_external(
level STRING
)
STORED AS ICEBERG
LOCATION '$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE.iceberg_test_with_location'
LOCATION '$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE.iceberg_test_with_location'
TBLPROPERTIES('iceberg.catalog'='hadoop.tables');
---- RESULTS
'Table has been created.'
@@ -97,7 +97,7 @@ STRING,BIGINT,BIGINT
---- QUERY
CREATE EXTERNAL TABLE iceberg_hadoop_tbls_external_empty_col
STORED AS ICEBERG
LOCATION '$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE.iceberg_test_with_location'
LOCATION '$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE.iceberg_test_with_location'
TBLPROPERTIES('iceberg.catalog'='hadoop.tables');
---- RESULTS
'Table has been created.'
@@ -137,7 +137,7 @@ PARTITIONED BY SPEC
)
STORED AS ICEBERG
TBLPROPERTIES('iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test');
---- RESULTS
'Table has been created.'
====
@@ -171,13 +171,13 @@ PARTITIONED BY SPEC
)
STORED AS ICEBERG
TBLPROPERTIES('iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test');
CREATE EXTERNAL TABLE iceberg_hadoop_cat_external(
level STRING
)
STORED AS ICEBERG
TBLPROPERTIES('iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test', 'iceberg.table_identifier'='$DATABASE.iceberg_hadoop_catalog');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test', 'iceberg.table_identifier'='$DATABASE.iceberg_hadoop_catalog');
---- RESULTS
'Table has been created.'
====
@@ -476,7 +476,7 @@ create table ice_part_hadoop_catalog (
col_identity
) stored as iceberg TBLPROPERTIES(
'iceberg.catalog' = 'hadoop.catalog',
'iceberg.catalog_location' = '$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test'
'iceberg.catalog_location' = '$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test'
);
---- RESULTS
'Table has been created.'

View File

@@ -266,7 +266,7 @@ CREATE TABLE iceberg_table_hadoop_catalog(
)
STORED AS ICEBERG
TBLPROPERTIES('iceberg.catalog'='hadoop.catalog',
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/other/$DATABASE/hadoop_catalog_test');
'iceberg.catalog_location'='$WAREHOUSE_LOCATION_PREFIX/test_warehouse/$DATABASE/hadoop_catalog_test');
ALTER TABLE iceberg_table_hadoop_catalog RENAME TO iceberg_table_hadoop_catalog_new;
---- CATCH
UnsupportedOperationException: Cannot rename Iceberg tables that use 'hadoop.catalog' as catalog.