From cb6e1291be17dc8059816ca5d4284740f30c2083 Mon Sep 17 00:00:00 2001 From: Binglin Chang Date: Wed, 25 Sep 2024 11:28:45 +0800 Subject: [PATCH] [BugFix] Fix test_hive_sink fail (#51365) Signed-off-by: Binglin Chang (cherry picked from commit 4af7bf65930d50ab37e0b171b6e78b01ff1aca56) # Conflicts: # test/sql/test_hive/R/test_hive_sink --- test/sql/test_hive/R/test_hive_sink | 61 +++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 test/sql/test_hive/R/test_hive_sink diff --git a/test/sql/test_hive/R/test_hive_sink b/test/sql/test_hive/R/test_hive_sink new file mode 100644 index 0000000000000..914bdc463f609 --- /dev/null +++ b/test/sql/test_hive/R/test_hive_sink @@ -0,0 +1,61 @@ +-- name: test_hive_sink +create external catalog hive_sink_test_${uuid0} PROPERTIES ("type"="hive", "hive.metastore.uris"="${hive_metastore_uris}"); +-- result: +-- !result +set catalog hive_sink_test_${uuid0}; +-- result: +-- !result +create database hive_db_${uuid0}; +-- result: +-- !result +use hive_db_${uuid0}; +-- result: +-- !result +create table t1 (k1 int, k2 int, k3 date, k4 smallint) partition by (k3, k4); +-- result: +-- !result +insert into t1 select 999,888,'9999-12-03', 3; +-- result: +-- !result +select * from t1; +-- result: +999 888 9999-12-03 3 +-- !result +insert into t1 values( 999,888,'9999-12-03', 3),( 999,888,'9999-12-33', 3); +-- result: +[REGEX].*Partition value can't be null.* +-- !result +select * from t1; +-- result: +999 888 9999-12-03 3 +-- !result +drop table t1 force; +-- result: +-- !result +CREATE TABLE struct_index ( +date varchar(1048576) NULL COMMENT "", +hash varchar(1048576) NULL COMMENT "", +input struct<`index` bigint(20), value double> NULL COMMENT "", +outputs array> NULL COMMENT "" +); +-- result: +-- !result +insert into struct_index values ('20210101', '123', row(1,1.1), [row(1,1.1)]); +-- result: +-- !result +select /*+ set_var(enable_prune_complex_types = false) */ outputs[1].`index`, input.`index` from struct_index; +-- result: +1 1 +-- !result +drop table struct_index force; +-- result: +-- !result +drop database hive_db_${uuid0}; +-- result: +-- !result +drop catalog hive_sink_test_${uuid0}; +-- result: +-- !result +set catalog default_catalog; +-- result: +-- !result \ No newline at end of file