This is an automated email from the ASF dual-hosted git repository.

jasonmfehr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit f8f20203913f927dc563611177e0b03074c82d7a
Author: Noemi Pap-Takacs <[email protected]>
AuthorDate: Mon Dec 16 15:27:15 2024 +0100

    IMPALA-13608: Fix TestIcebergTable.test_catalogs exhaustive test failure
    
    TestIcebergTable.test_catalogs contained 2 tables
    that were created in the default Hadoop Catalog location:
    'iceberg.catalog_location' = 'ice_hadoop_cat'.
    As a result of this, the tables were created under the path defined in
    hive-site.xml.py and not in the unique database directory.
    They both had a constant string as the table identifier that was
    concatenated to the catalog location to form the table's path.
    When the test was run in parallel, it failed with AlreadyExistsException
    because all tests created the table with the same name in the same
    directory.
    Fix: Added unique database to the table identifier so that it became
    unique and the tables are stored in separate directories.
    
    Testing:
    - Ran TestIcebergTable.test_catalogs locally
      in exhaustive mode multiple times before and after the fix.
      Command:
     'tests/run-tests.py 
--workload_exploration_strategy=functional-query:exhaustive
      query_test/test_iceberg.py::TestIcebergTable::test_catalogs'
    
    Change-Id: If193945f11d450000523a194acd56936a364a9e1
    Reviewed-on: http://gerrit.cloudera.org:8080/22218
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 .../queries/QueryTest/iceberg-catalogs.test            | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/testdata/workloads/functional-query/queries/QueryTest/iceberg-catalogs.test 
b/testdata/workloads/functional-query/queries/QueryTest/iceberg-catalogs.test
index 843c12754..d5593a2d1 100644
--- 
a/testdata/workloads/functional-query/queries/QueryTest/iceberg-catalogs.test
+++ 
b/testdata/workloads/functional-query/queries/QueryTest/iceberg-catalogs.test
@@ -25,14 +25,14 @@ CREATE TABLE iceberg_hadoop_catalogs_with_id(
 PARTITIONED BY SPEC(label)
 STORED AS ICEBERG
 TBLPROPERTIES('iceberg.catalog'='ice_hadoop_cat',
-'iceberg.table_identifier'='org.db.tbl');
+'iceberg.table_identifier'='org.$DATABASE.tbl');
 DESCRIBE FORMATTED iceberg_hadoop_catalogs_with_id;
 ---- RESULTS: VERIFY_IS_SUBSET
-'Location:           
','$NAMENODE/test-warehouse/ice_hadoop_cat/org/db/tbl','NULL'
+'Location:           
','$NAMENODE/test-warehouse/ice_hadoop_cat/org/$DATABASE/tbl','NULL'
 '','write.format.default','parquet             '
 '','iceberg.catalog     ','ice_hadoop_cat      '
-'','iceberg.table_identifier','org.db.tbl          '
-'','name                ','org.db.tbl          '
+'','iceberg.table_identifier','org.$DATABASE.tbl'
+'','name                ','org.$DATABASE.tbl'
 ---- TYPES
 string, string, string
 ====
@@ -47,7 +47,7 @@ STRING,DECIMAL
 ---- QUERY
 SHOW FILES IN iceberg_hadoop_catalogs_with_id;
 ---- RESULTS
-row_regex:'$NAMENODE/test-warehouse/ice_hadoop_cat/org/db/tbl/data/label=ice/.*.0.parq','.*','','$ERASURECODE_POLICY'
+row_regex:'$NAMENODE/test-warehouse/ice_hadoop_cat/org/$DATABASE/tbl/data/label=ice/.*.0.parq','.*','','$ERASURECODE_POLICY'
 ---- TYPES
 STRING, STRING, STRING, STRING
 ====
@@ -55,18 +55,18 @@ STRING, STRING, STRING, STRING
 CREATE EXTERNAL TABLE iceberg_hadoop_cat_with_id_ext
 STORED AS ICEBERG
 TBLPROPERTIES('iceberg.catalog'='ice_hadoop_cat',
-'iceberg.table_identifier'='org.db.tbl');
+'iceberg.table_identifier'='org.$DATABASE.tbl');
 ---- RESULTS
 'Table has been created.'
 ====
 ---- QUERY
 DESCRIBE FORMATTED iceberg_hadoop_cat_with_id_ext;
 ---- RESULTS: VERIFY_IS_SUBSET
-'Location:           
','$NAMENODE/test-warehouse/ice_hadoop_cat/org/db/tbl','NULL'
+'Location:           
','$NAMENODE/test-warehouse/ice_hadoop_cat/org/$DATABASE/tbl','NULL'
 '','write.format.default','parquet             '
 '','iceberg.catalog     ','ice_hadoop_cat      '
-'','iceberg.table_identifier','org.db.tbl          '
-'','name                ','org.db.tbl          '
+'','iceberg.table_identifier','org.$DATABASE.tbl'
+'','name                ','org.$DATABASE.tbl'
 ---- TYPES
 string, string, string
 ====

Reply via email to