-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support iceberg sink partition write (#12664)
Co-authored-by: ZENOTME <[email protected]>
- Loading branch information
Showing
6 changed files
with
105 additions
and
16 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 (v_int,v_long,v_float,v_double,v_varchar,v_bool,v_date,v_timestamp,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,35 @@ | ||
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 | ||
) USING iceberg | ||
PARTITIONED BY (v1,v2) | ||
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 | ||
1,2,2,2-2 | ||
1,3,2,3-2 | ||
1,5,2,5-2 | ||
1,8,2,8-2 | ||
1,13,2,13-2 | ||
1,21,2,21-2 | ||
""" | ||
|
||
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