-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add more tests, especially tests taht test delete vectors
- Loading branch information
Showing
49 changed files
with
1,238 additions
and
4 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
6 changes: 6 additions & 0 deletions
6
...ts/data_generators/generate_spark_local/lineitem_001_deletes/lineitem_001_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE iceberg_catalog.lineitem_001_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
11 changes: 11 additions & 0 deletions
11
...ts/data_generators/generate_spark_local/lineitem_001_deletes/lineitem_001_deletes/q01.sql
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,11 @@ | ||
update iceberg_catalog.lineitem_001_deletes | ||
set l_orderkey=NULL, | ||
l_partkey=NULL, | ||
l_suppkey=NULL, | ||
l_linenumber=NULL, | ||
l_quantity=NULL, | ||
l_extendedprice=NULL, | ||
l_discount=NULL, | ||
l_shipdate=NULL, | ||
l_comment=NULL | ||
where l_partkey % 2 = 0; |
8 changes: 8 additions & 0 deletions
8
...s/data_generators/generate_spark_local/lineitem_001_deletes/lineitem_001_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_local/lineitem_001_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE iceberg_catalog.lineitem_001_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
11 changes: 11 additions & 0 deletions
11
scripts/data_generators/generate_spark_local/lineitem_001_deletes/q01.sql
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,11 @@ | ||
update iceberg_catalog.lineitem_001_deletes | ||
set l_orderkey=NULL, | ||
l_partkey=NULL, | ||
l_suppkey=NULL, | ||
l_linenumber=NULL, | ||
l_quantity=NULL, | ||
l_extendedprice=NULL, | ||
l_discount=NULL, | ||
l_shipdate=NULL, | ||
l_comment=NULL | ||
where l_partkey % 2 = 0; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_001_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_partitioned_l_shipmode/q00.sql
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,8 @@ | ||
CREATE OR REPLACE TABLE iceberg_catalog.lineitem_partitioned_l_shipmode | ||
USING iceberg | ||
PARTITIONED BY (l_shipmode) | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
as select * from parquet_file_view; |
1 change: 1 addition & 0 deletions
1
scripts/data_generators/generate_spark_local/lineitem_partitioned_l_shipmode/q01.sql
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 @@ | ||
delete from iceberg_catalog.lineitem_partitioned_l_shipmode where l_shipmode = 'TRUCK'; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_partitioned_l_shipmode/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_partitioned_l_shipmode_deletes/q00.sql
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,8 @@ | ||
CREATE OR REPLACE TABLE iceberg_catalog.lineitem_partitioned_l_shipmode_deletes | ||
USING iceberg | ||
PARTITIONED BY (l_shipmode) | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
as select * from parquet_file_view; |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_local/lineitem_partitioned_l_shipmode_deletes/q01.sql
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,6 @@ | ||
UPDATE iceberg_catalog.lineitem_partitioned_l_shipmode_deletes | ||
Set l_comment=NULL, | ||
l_quantity=NULL, | ||
l_discount=NULL, | ||
l_linestatus=NULL | ||
where l_linenumber = 3 or l_linenumber = 4 or l_linenumber = 5; |
8 changes: 8 additions & 0 deletions
8
...pts/data_generators/generate_spark_local/lineitem_partitioned_l_shipmode_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_local/lineitem_sf1_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE iceberg_catalog.lineitem_sf1_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
11 changes: 11 additions & 0 deletions
11
scripts/data_generators/generate_spark_local/lineitem_sf1_deletes/q01.sql
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,11 @@ | ||
update iceberg_catalog.lineitem_sf1_deletes | ||
set l_orderkey=NULL, | ||
l_partkey=NULL, | ||
l_suppkey=NULL, | ||
l_linenumber=NULL, | ||
l_quantity=NULL, | ||
l_extendedprice=NULL, | ||
l_discount=NULL, | ||
l_shipdate=NULL, | ||
l_comment=NULL | ||
where l_partkey % 2 = 0; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_sf1_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=1)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_local/lineitem_sf_01_1_delete/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE iceberg_catalog.lineitem_sf_01_1_delete | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
1 change: 1 addition & 0 deletions
1
scripts/data_generators/generate_spark_local/lineitem_sf_01_1_delete/q01.sql
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 @@ | ||
delete from iceberg_catalog.lineitem_sf_01_1_delete where l_orderkey=10053 and l_partkey = 77; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_sf_01_1_delete/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_local/lineitem_sf_01_no_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE iceberg_catalog.lineitem_sf_01_no_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/lineitem_sf_01_no_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_local/table_with_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE iceberg_catalog.table_with_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
11 changes: 11 additions & 0 deletions
11
scripts/data_generators/generate_spark_local/table_with_deletes/q01.sql
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,11 @@ | ||
update iceberg_catalog.table_with_deletes | ||
set l_orderkey=NULL, | ||
l_partkey=NULL, | ||
l_suppkey=NULL, | ||
l_linenumber=NULL, | ||
l_quantity=NULL, | ||
l_extendedprice=NULL, | ||
l_discount=NULL, | ||
l_shipdate=NULL, | ||
l_comment=NULL | ||
where l_partkey % 2 = 0; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_local/table_with_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_rest/lineitem_001_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE default.lineitem_001_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
11 changes: 11 additions & 0 deletions
11
scripts/data_generators/generate_spark_rest/lineitem_001_deletes/q01.sql
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,11 @@ | ||
update default.lineitem_001_deletes | ||
set l_orderkey=NULL, | ||
l_partkey=NULL, | ||
l_suppkey=NULL, | ||
l_linenumber=NULL, | ||
l_quantity=NULL, | ||
l_extendedprice=NULL, | ||
l_discount=NULL, | ||
l_shipdate=NULL, | ||
l_comment=NULL | ||
where l_partkey % 2 = 0; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_001_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_partitioned_l_shipmode/q00.sql
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,8 @@ | ||
CREATE OR REPLACE TABLE default.lineitem_partitioned_l_shipmode | ||
USING iceberg | ||
PARTITIONED BY (l_shipmode) | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
as select * from parquet_file_view; |
1 change: 1 addition & 0 deletions
1
scripts/data_generators/generate_spark_rest/lineitem_partitioned_l_shipmode/q01.sql
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 @@ | ||
delete from default.lineitem_partitioned_l_shipmode where l_shipmode = 'TRUCK'; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_partitioned_l_shipmode/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_partitioned_l_shipmode_deletes/q00.sql
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,8 @@ | ||
CREATE OR REPLACE TABLE default.lineitem_partitioned_l_shipmode_deletes | ||
USING iceberg | ||
PARTITIONED BY (l_shipmode) | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
as select * from parquet_file_view; |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_rest/lineitem_partitioned_l_shipmode_deletes/q01.sql
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,6 @@ | ||
UPDATE default.lineitem_partitioned_l_shipmode_deletes | ||
Set l_comment=NULL, | ||
l_quantity=NULL, | ||
l_discount=NULL, | ||
l_linestatus=NULL | ||
where l_linenumber = 3 or l_linenumber = 4 or l_linenumber = 5; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_partitioned_l_shipmode_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_rest/lineitem_sf1_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE default.lineitem_sf1_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
11 changes: 11 additions & 0 deletions
11
scripts/data_generators/generate_spark_rest/lineitem_sf1_deletes/q01.sql
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,11 @@ | ||
update default.lineitem_sf1_deletes | ||
set l_orderkey=NULL, | ||
l_partkey=NULL, | ||
l_suppkey=NULL, | ||
l_linenumber=NULL, | ||
l_quantity=NULL, | ||
l_extendedprice=NULL, | ||
l_discount=NULL, | ||
l_shipdate=NULL, | ||
l_comment=NULL | ||
where l_partkey % 2 = 0; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_sf1_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=1)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_rest/lineitem_sf_01_1_delete/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE default.lineitem_sf_01_1_delete | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
1 change: 1 addition & 0 deletions
1
scripts/data_generators/generate_spark_rest/lineitem_sf_01_1_delete/q01.sql
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 @@ | ||
delete from default.lineitem_sf_01_1_delete where l_orderkey=10053 and l_partkey = 77; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_sf_01_1_delete/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
6 changes: 6 additions & 0 deletions
6
scripts/data_generators/generate_spark_rest/lineitem_sf_01_no_deletes/q00.sql
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,6 @@ | ||
CREATE or REPLACE TABLE default.lineitem_sf_01_no_deletes | ||
TBLPROPERTIES ( | ||
'format-version'='2', | ||
'write.update.mode'='merge-on-read' | ||
) | ||
AS SELECT * FROM parquet_file_view; |
8 changes: 8 additions & 0 deletions
8
scripts/data_generators/generate_spark_rest/lineitem_sf_01_no_deletes/setup.py
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,8 @@ | ||
import duckdb | ||
import os | ||
|
||
PARQUET_SRC_FILE = os.getenv('PARQUET_SRC_FILE') | ||
|
||
duckdb_con = duckdb.connect() | ||
duckdb_con.execute("call dbgen(sf=0.01)") | ||
duckdb_con.execute(f"copy lineitem to '{PARQUET_SRC_FILE}' (FORMAT PARQUET)") |
Oops, something went wrong.