This is an automated email from the ASF dual-hosted git repository. tarmstrong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 5c91ff27372adb3117cf48ce95ab7f7b1b9ee73a Author: skyyws <sky...@163.com> AuthorDate: Fri Nov 20 16:43:30 2020 +0800 IMPALA-10346: Rename Iceberg test tables' name with specific cases We used some unrecognized table names in Iceberg related test cases, such as iceberg_test1/iceberg_test2 and so on, which resulted in poor readability. So we better rename these Iceberg test tables' name by specific cases. Testing: - Renamed tables' name in iceberg-create.test - Renamed tables' name in iceberg-alter.test Change-Id: Ifdaeaaeed69753222668342dcac852677fdd9ae5 Reviewed-on: http://gerrit.cloudera.org:8080/16753 Reviewed-by: Zoltan Borok-Nagy <borokna...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- .../queries/QueryTest/iceberg-alter.test | 44 ++++++------ .../queries/QueryTest/iceberg-create.test | 80 +++++++++++----------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-alter.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-alter.test index 21557cb..b5c9827 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-alter.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-alter.test @@ -1,14 +1,14 @@ ==== ---- QUERY -CREATE TABLE iceberg_test1( +CREATE TABLE iceberg_hadoop_tables( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); -ALTER TABLE iceberg_test1 ADD COLUMNS(event_time TIMESTAMP, register_time DATE); -ALTER TABLE iceberg_test1 ADD COLUMNS(message STRING, price DECIMAL(8,1)); -ALTER TABLE iceberg_test1 ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1: BIGINT, f2: BIGINT>); -DESCRIBE iceberg_test1; +ALTER TABLE iceberg_hadoop_tables ADD COLUMNS(event_time TIMESTAMP, register_time DATE); +ALTER TABLE iceberg_hadoop_tables ADD COLUMNS(message STRING, price DECIMAL(8,1)); +ALTER TABLE iceberg_hadoop_tables ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1: BIGINT, f2: BIGINT>); +DESCRIBE iceberg_hadoop_tables; ---- RESULTS 'level','string','' 'event_time','timestamp','' @@ -21,16 +21,16 @@ DESCRIBE iceberg_test1; STRING,STRING,STRING ==== ---- QUERY -ALTER TABLE iceberg_test1 set TBLPROPERTIES('fake_key'='fake_value'); -DESCRIBE FORMATTED iceberg_test1; +ALTER TABLE iceberg_hadoop_tables set TBLPROPERTIES('fake_key'='fake_value'); +DESCRIBE FORMATTED iceberg_hadoop_tables; ---- RESULTS: VERIFY_IS_SUBSET '','fake_key ','fake_value ' ---- TYPES string, string, string ==== ---- QUERY -ALTER TABLE iceberg_test1 set OWNER USER fake_user; -DESCRIBE FORMATTED iceberg_test1; +ALTER TABLE iceberg_hadoop_tables set OWNER USER fake_user; +DESCRIBE FORMATTED iceberg_hadoop_tables; ---- RESULTS: VERIFY_IS_SUBSET 'OwnerType: ','USER ','NULL' 'Owner: ','fake_user ','NULL' @@ -38,8 +38,8 @@ DESCRIBE FORMATTED iceberg_test1; string, string, string ==== ---- QUERY -ALTER TABLE iceberg_test1 set OWNER ROLE fake_role; -DESCRIBE FORMATTED iceberg_test1; +ALTER TABLE iceberg_hadoop_tables set OWNER ROLE fake_role; +DESCRIBE FORMATTED iceberg_hadoop_tables; ---- RESULTS: VERIFY_IS_SUBSET 'OwnerType: ','ROLE ','NULL' 'Owner: ','fake_role ','NULL' @@ -47,16 +47,16 @@ DESCRIBE FORMATTED iceberg_test1; string, string, string ==== ---- QUERY -CREATE TABLE iceberg_test2( +CREATE TABLE iceberg_hadoop_catalog( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', 'iceberg.catalog_location'='/$DATABASE/hadoop_catalog_test'); -ALTER TABLE iceberg_test2 ADD COLUMNS(event_time TIMESTAMP, register_time DATE); -ALTER TABLE iceberg_test2 ADD COLUMNS(message STRING, price DECIMAL(8,1)); -ALTER TABLE iceberg_test2 ADD COLUMNS(map_test MAP <STRING, array <STRING>>, struct_test STRUCT <f1: BIGINT, f2: BIGINT>); -DESCRIBE iceberg_test2; +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>); +DESCRIBE iceberg_hadoop_catalog; ---- RESULTS 'level','string','' 'event_time','timestamp','' @@ -69,16 +69,16 @@ DESCRIBE iceberg_test2; STRING,STRING,STRING ==== ---- QUERY -ALTER TABLE iceberg_test2 set TBLPROPERTIES('test_key'='test_value'); -DESCRIBE FORMATTED iceberg_test2; +ALTER TABLE iceberg_hadoop_catalog set TBLPROPERTIES('test_key'='test_value'); +DESCRIBE FORMATTED iceberg_hadoop_catalog; ---- RESULTS: VERIFY_IS_SUBSET '','test_key ','test_value ' ---- TYPES string, string, string ==== ---- QUERY -ALTER TABLE iceberg_test2 set OWNER USER fake_user; -DESCRIBE FORMATTED iceberg_test2; +ALTER TABLE iceberg_hadoop_catalog set OWNER USER fake_user; +DESCRIBE FORMATTED iceberg_hadoop_catalog; ---- RESULTS: VERIFY_IS_SUBSET 'OwnerType: ','USER ','NULL' 'Owner: ','fake_user ','NULL' @@ -86,8 +86,8 @@ DESCRIBE FORMATTED iceberg_test2; string, string, string ==== ---- QUERY -ALTER TABLE iceberg_test2 set OWNER ROLE fake_role; -DESCRIBE FORMATTED iceberg_test2; +ALTER TABLE iceberg_hadoop_catalog set OWNER ROLE fake_role; +DESCRIBE FORMATTED iceberg_hadoop_catalog; ---- RESULTS: VERIFY_IS_SUBSET 'OwnerType: ','ROLE ','NULL' 'Owner: ','fake_role ','NULL' diff --git a/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test b/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test index e8af62d..8fde387 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test +++ b/testdata/workloads/functional-query/queries/QueryTest/iceberg-create.test @@ -1,6 +1,6 @@ ==== ---- QUERY -CREATE TABLE iceberg_test1( +CREATE TABLE iceberg_hadoop_tables( level STRING, event_time TIMESTAMP, register_time DATE, @@ -24,7 +24,7 @@ TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); 'Table has been created.' ==== ---- QUERY -DESCRIBE iceberg_test1; +DESCRIBE iceberg_hadoop_tables; ---- RESULTS 'level','string','' 'event_time','timestamp','' @@ -37,7 +37,7 @@ DESCRIBE iceberg_test1; STRING,STRING,STRING ==== ---- QUERY -SHOW PARTITIONS iceberg_test1; +SHOW PARTITIONS iceberg_hadoop_tables; ---- RESULTS 0,1,1000,'level','IDENTITY' 0,1,1001,'level_trunc','TRUNCATE 10' @@ -49,24 +49,24 @@ SHOW PARTITIONS iceberg_test1; BIGINT,BIGINT,BIGINT,STRING,STRING ==== ---- QUERY -DROP TABLE iceberg_test1; +DROP TABLE iceberg_hadoop_tables; ---- RESULTS 'Table has been dropped.' ==== ---- QUERY -CREATE TABLE iceberg_test2( +CREATE TABLE iceberg_hadoop_tables( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); -DESCRIBE iceberg_test2; +DESCRIBE iceberg_hadoop_tables; ---- RESULTS 'level','string','' ---- TYPES STRING,STRING,STRING ==== ---- QUERY -CREATE EXTERNAL TABLE iceberg_test_external( +CREATE EXTERNAL TABLE iceberg_hadoop_tbls_external( level STRING ) STORED AS ICEBERG @@ -75,7 +75,7 @@ TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); 'Location is necessary for external iceberg table.' ==== ---- QUERY -CREATE TABLE iceberg_test4( +CREATE TABLE iceberg_hadoop_tbls_with_loc( level STRING ) PARTITION BY SPEC @@ -87,7 +87,7 @@ PARTITION BY SPEC STORED AS ICEBERG LOCATION '/$DATABASE.iceberg_test_with_location' TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); -CREATE EXTERNAL TABLE iceberg_test_external( +CREATE EXTERNAL TABLE iceberg_hadoop_tbls_external( level STRING ) STORED AS ICEBERG @@ -97,14 +97,14 @@ TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); 'Table has been created.' ==== ---- QUERY -DESCRIBE iceberg_test_external; +DESCRIBE iceberg_hadoop_tbls_external; ---- RESULTS 'level','string','' ---- TYPES STRING,STRING,STRING ==== ---- QUERY -SHOW PARTITIONS iceberg_test_external; +SHOW PARTITIONS iceberg_hadoop_tbls_external; ---- RESULTS 0,1,1000,'level','IDENTITY' 0,1,1001,'level_bucket','BUCKET 12345' @@ -113,7 +113,7 @@ SHOW PARTITIONS iceberg_test_external; BIGINT,BIGINT,BIGINT,STRING,STRING ==== ---- QUERY -CREATE EXTERNAL TABLE iceberg_test_external_empty_column +CREATE EXTERNAL TABLE iceberg_hadoop_tbls_external_empty_col STORED AS ICEBERG LOCATION '/$DATABASE.iceberg_test_with_location' TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); @@ -121,14 +121,14 @@ TBLPROPERTIES('iceberg.catalog'='hadoop.tables'); 'Table has been created.' ==== ---- QUERY -DESCRIBE iceberg_test_external_empty_column; +DESCRIBE iceberg_hadoop_tbls_external_empty_col; ---- RESULTS 'level','string','' ---- TYPES STRING,STRING,STRING ==== ---- QUERY -SHOW PARTITIONS iceberg_test_external_empty_column; +SHOW PARTITIONS iceberg_hadoop_tbls_external_empty_col; ---- RESULTS 0,1,1000,'level','IDENTITY' 0,1,1001,'level_bucket','BUCKET 12345' @@ -137,14 +137,14 @@ SHOW PARTITIONS iceberg_test_external_empty_column; BIGINT,BIGINT,BIGINT,STRING,STRING ==== ---- QUERY -DROP TABLE iceberg_test4; -DROP TABLE iceberg_test_external; -DROP TABLE iceberg_test_external_empty_column; +DROP TABLE iceberg_hadoop_tbls_with_loc; +DROP TABLE iceberg_hadoop_tbls_external; +DROP TABLE iceberg_hadoop_tbls_external_empty_col; ---- RESULTS 'Table has been dropped.' ==== ---- QUERY -CREATE TABLE iceberg_test5( +CREATE TABLE iceberg_hadoop_catalog( level STRING, event_time TIMESTAMP, register_time DATE, @@ -169,7 +169,7 @@ TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', 'Table has been created.' ==== ---- QUERY -DESCRIBE iceberg_test5; +DESCRIBE iceberg_hadoop_catalog; ---- RESULTS 'level','string','' 'event_time','timestamp','' @@ -182,7 +182,7 @@ DESCRIBE iceberg_test5; STRING,STRING,STRING ==== ---- QUERY -SHOW PARTITIONS iceberg_test5; +SHOW PARTITIONS iceberg_hadoop_catalog; ---- RESULTS 0,1,1000,'level','IDENTITY' 0,1,1001,'level_trunc','TRUNCATE 10' @@ -194,12 +194,12 @@ SHOW PARTITIONS iceberg_test5; BIGINT,BIGINT,BIGINT,STRING,STRING ==== ---- QUERY -DROP TABLE iceberg_test5; +DROP TABLE iceberg_hadoop_catalog; ---- RESULTS 'Table has been dropped.' ==== ---- QUERY -CREATE TABLE iceberg_test6( +CREATE TABLE iceberg_hadoop_catalog( level STRING ) PARTITION BY SPEC @@ -211,24 +211,24 @@ PARTITION BY SPEC STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', 'iceberg.catalog_location'='/$DATABASE/hadoop_catalog_test'); -CREATE EXTERNAL TABLE iceberg_test6_external( +CREATE EXTERNAL TABLE iceberg_hadoop_cat_external( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', -'iceberg.catalog_location'='/$DATABASE/hadoop_catalog_test', 'iceberg.table_identifier'='$DATABASE.iceberg_test6'); +'iceberg.catalog_location'='/$DATABASE/hadoop_catalog_test', 'iceberg.table_identifier'='$DATABASE.iceberg_hadoop_catalog'); ---- RESULTS 'Table has been created.' ==== ---- QUERY -DESCRIBE iceberg_test6_external; +DESCRIBE iceberg_hadoop_cat_external; ---- RESULTS 'level','string','' ---- TYPES STRING,STRING,STRING ==== ---- QUERY -SHOW PARTITIONS iceberg_test6_external; +SHOW PARTITIONS iceberg_hadoop_cat_external; ---- RESULTS 0,1,1000,'level','IDENTITY' 0,1,1001,'level_bucket','BUCKET 12345' @@ -237,34 +237,34 @@ SHOW PARTITIONS iceberg_test6_external; BIGINT,BIGINT,BIGINT,STRING,STRING ==== ---- QUERY -DROP TABLE iceberg_test6; -DROP TABLE iceberg_test6_external; +DROP TABLE iceberg_hadoop_catalog; +DROP TABLE iceberg_hadoop_cat_external; ---- RESULTS 'Table has been dropped.' ==== ---- QUERY -CREATE TABLE iceberg_test7( +CREATE TABLE iceberg_hadoop_cat_drop( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', 'iceberg.catalog_location'='/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test'); -CREATE TABLE iceberg_test8( +CREATE TABLE iceberg_hadoop_cat_query( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', 'iceberg.catalog_location'='/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test'); -DROP TABLE iceberg_test7; -SELECT * FROM iceberg_test8; +DROP TABLE iceberg_hadoop_cat_drop; +SELECT * FROM iceberg_hadoop_cat_query; ---- TYPES string ---- RESULTS ==== ---- QUERY -DESCRIBE FORMATTED iceberg_test8; +DESCRIBE FORMATTED iceberg_hadoop_cat_query; ---- RESULTS: VERIFY_IS_SUBSET -'Location: ','$NAMENODE/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test/$DATABASE/iceberg_test8','NULL' +'Location: ','$NAMENODE/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test/$DATABASE/iceberg_hadoop_cat_query','NULL' '','iceberg.catalog_location','/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test' '','iceberg.file_format ','parquet ' '','iceberg.catalog ','hadoop.catalog ' @@ -272,14 +272,14 @@ DESCRIBE FORMATTED iceberg_test8; string, string, string ==== ---- QUERY -CREATE TABLE iceberg_test9( +CREATE TABLE iceberg_hadoop_cat_with_ident( level STRING ) STORED AS ICEBERG TBLPROPERTIES('iceberg.catalog'='hadoop.catalog', 'iceberg.catalog_location'='/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test', 'iceberg.table_identifier'='org.db.tbl'); -DESCRIBE FORMATTED iceberg_test9; +DESCRIBE FORMATTED iceberg_hadoop_cat_with_ident; ---- RESULTS: VERIFY_IS_SUBSET 'Location: ','$NAMENODE/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test/org/db/tbl','NULL' '','iceberg.catalog_location','/test-warehouse/$DATABASE/hadoop_catalog_test/iceberg_test' @@ -289,7 +289,7 @@ DESCRIBE FORMATTED iceberg_test9; string, string, string ==== ---- QUERY -CREATE TABLE iceberg_test10( +CREATE TABLE iceberg_hadoop_cat_with_orc( level STRING, event_time TIMESTAMP, register_time DATE, @@ -312,7 +312,7 @@ TBLPROPERTIES('iceberg.file_format'='orc','iceberg_catalog'='hadoop.tables', 'Table has been created.' ==== ---- QUERY -DESCRIBE iceberg_test10; +DESCRIBE iceberg_hadoop_cat_with_orc; ---- RESULTS 'level','string','' 'event_time','timestamp','' @@ -325,7 +325,7 @@ DESCRIBE iceberg_test10; STRING,STRING,STRING ==== ---- QUERY -SHOW PARTITIONS iceberg_test10; +SHOW PARTITIONS iceberg_hadoop_cat_with_orc; ---- RESULTS 0,1,1000,'level','IDENTITY' 0,2,1001,'event_time','IDENTITY' @@ -335,7 +335,7 @@ SHOW PARTITIONS iceberg_test10; BIGINT,BIGINT,BIGINT,STRING,STRING ==== ---- QUERY -DROP TABLE iceberg_test10; +DROP TABLE iceberg_hadoop_cat_with_orc; ---- RESULTS 'Table has been dropped.' ====