-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ZENOTME
committed
Jan 29, 2024
1 parent
0ee0497
commit 397faa4
Showing
6 changed files
with
100 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
e2e_test/iceberg/test_case/range_partition_append_only.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
init_sqls = [ | ||
'CREATE SCHEMA IF NOT EXISTS demo_db', | ||
'DROP TABLE IF EXISTS demo_db.demo_table', | ||
''' | ||
CREATE TABLE demo_db.demo_table ( | ||
id long, | ||
v_int int, | ||
v_long long, | ||
v_float float, | ||
v_double double, | ||
v_varchar string, | ||
v_bool boolean, | ||
v_date date, | ||
v_timestamp timestamp, | ||
v_ts_ntz timestamp_ntz | ||
) | ||
PARTITIONED BY (years(v_date),months(v_timestamp),days(v_ts_ntz)) | ||
TBLPROPERTIES ('format-version'='2'); | ||
''' | ||
] | ||
|
||
slt = 'test_case/iceberg_sink_append_only.slt' | ||
|
||
verify_schema = ['long', 'int', 'long', 'float', 'double', 'string', 'boolean', 'date', 'timestamp', 'timestamp_ntz'] | ||
|
||
verify_sql = 'SELECT * FROM demo_db.demo_table ORDER BY id ASC' | ||
|
||
|
||
verify_data = """ | ||
1,1,1000,1.1,1.11,1-1,true,2022-03-11,2022-03-11 01:00:00+00:00,2022-03-11 01:00:00 | ||
2,2,2000,2.2,2.22,2-2,false,2022-03-12,2022-03-12 02:00:00+00:00,2022-03-12 02:00:00 | ||
3,3,3000,3.3,3.33,3-3,true,2022-03-13,2022-03-13 03:00:00+00:00,2022-03-13 03:00:00 | ||
4,4,4000,4.4,4.44,4-4,false,2022-03-14,2022-03-14 04:00:00+00:00,2022-03-14 04:00:00 | ||
5,5,5000,5.5,5.55,5-5,true,2022-03-15,2022-03-15 05:00:00+00:00,2022-03-15 05:00:00 | ||
""" | ||
|
||
drop_sqls = [ | ||
'DROP TABLE IF EXISTS demo_db.demo_table', | ||
'DROP SCHEMA IF EXISTS demo_db' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
init_sqls = [ | ||
'CREATE SCHEMA IF NOT EXISTS demo_db', | ||
'DROP TABLE IF EXISTS demo_db.demo_table', | ||
''' | ||
CREATE TABLE demo_db.demo_table ( | ||
id int, | ||
v1 int, | ||
v2 long, | ||
v3 string, | ||
v4 date | ||
) USING iceberg | ||
PARTITIONED BY (days(v4)) | ||
TBLPROPERTIES ('format-version'='2'); | ||
''' | ||
] | ||
|
||
slt = 'test_case/iceberg_sink_upsert.slt' | ||
|
||
verify_schema = ['int','int','long','string'] | ||
|
||
verify_sql = 'SELECT * FROM demo_db.demo_table ORDER BY id, v1 ASC' | ||
|
||
verify_data = """ | ||
1,1,50,1-50,2022-03-11 | ||
1,2,2,2-2,2022-03-12 | ||
1,3,2,3-2,2022-03-13 | ||
1,5,2,5-2,2022-03-15 | ||
1,8,2,8-2,2022-03-18 | ||
1,13,2,13-2,2022-03-13 | ||
1,21,2,21-2,2022-03-21 | ||
""" | ||
|
||
drop_sqls = [ | ||
'DROP TABLE IF EXISTS demo_db.demo_table', | ||
'DROP SCHEMA IF EXISTS demo_db' | ||
] |