Skip to content

Commit

Permalink
[UT]avoid bug on dropping hive table (backport #55895) (#55912)
Browse files Browse the repository at this point in the history
Co-authored-by: zombee0 <[email protected]>
  • Loading branch information
mergify[bot] and zombee0 authored Feb 15, 2025
1 parent 9b62f48 commit 5264b47
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
12 changes: 10 additions & 2 deletions test/sql/test_hive/R/test_hive_catalog
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
set enable_dynamic_prune_scan_range=false;
-- result:
-- !result
create external catalog hive_sql_test_${uuid0} PROPERTIES ("type"="hive", "hive.metastore.uris"="${hive_metastore_uris}");
create external catalog hive_sql_test_${uuid0} PROPERTIES ("type"="hive",
"hive.metastore.uris"="${hive_metastore_uris}",
"aws.s3.access_key"="${oss_ak}",
"aws.s3.secret_key"="${oss_sk}",
"aws.s3.endpoint"="${oss_endpoint}"
);
-- result:
-- !result
drop table if exists hive_sql_test_${uuid0}.hive_oss_db.not_exist_${uuid0};
-- result:
-- !result
select * from hive_sql_test_${uuid0}.hive_oss_db.hive_oss_par_parquet_snappy where col_date = (select max(col_date) from hive_sql_test_${uuid0}.hive_oss_db.hive_oss_par_parquet_snappy);
Expand Down Expand Up @@ -50,4 +58,4 @@ drop catalog unified_catalog_${uuid0};
-- !result
drop catalog hive_sql_test_${uuid0};
-- result:
-- !result
-- !result
10 changes: 9 additions & 1 deletion test/sql/test_hive/T/test_hive_catalog
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
-- name: testHiveCatalog
set enable_dynamic_prune_scan_range=false;

create external catalog hive_sql_test_${uuid0} PROPERTIES ("type"="hive", "hive.metastore.uris"="${hive_metastore_uris}");
create external catalog hive_sql_test_${uuid0} PROPERTIES ("type"="hive",
"hive.metastore.uris"="${hive_metastore_uris}",
"aws.s3.access_key"="${oss_ak}",
"aws.s3.secret_key"="${oss_sk}",
"aws.s3.endpoint"="${oss_endpoint}"
);

-- test drop if exists
drop table if exists hive_sql_test_${uuid0}.hive_oss_db.not_exist_${uuid0};

-- only partition column Predicate with runtime filter
select * from hive_sql_test_${uuid0}.hive_oss_db.hive_oss_par_parquet_snappy where col_date = (select max(col_date) from hive_sql_test_${uuid0}.hive_oss_db.hive_oss_par_parquet_snappy);
Expand Down

0 comments on commit 5264b47

Please sign in to comment.