Skip to content

Commit

Permalink
[BugFix] Fix test_hive_sink fail (#51365)
Browse files Browse the repository at this point in the history
Signed-off-by: Binglin Chang <[email protected]>
(cherry picked from commit 4af7bf6)

# Conflicts:
#	test/sql/test_hive/R/test_hive_sink
  • Loading branch information
decster authored and mergify[bot] committed Sep 25, 2024
1 parent 334ed99 commit a8a1005
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions test/sql/test_hive/R/test_hive_sink
Original file line number Diff line number Diff line change
@@ -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<struct<`index` bigint(20), value double>> 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

0 comments on commit a8a1005

Please sign in to comment.