Skip to content

Commit

Permalink
Renamings
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrikmakait committed Aug 20, 2024
1 parent c2f0f49 commit 459c006
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
18 changes: 9 additions & 9 deletions tests/tpch/duckdb_queries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def query_1(connection, dataset_path, scale):
def query_01(connection, dataset_path, scale):
return connection.execute(
f"""
with lineitem as (
Expand Down Expand Up @@ -30,7 +30,7 @@ def query_1(connection, dataset_path, scale):
).arrow()


def query_2(connection, dataset_path, scale):
def query_02(connection, dataset_path, scale):
return connection.execute(
f"""
with part as (select * from read_parquet('{dataset_path}part/*.parquet')),
Expand Down Expand Up @@ -87,7 +87,7 @@ def query_2(connection, dataset_path, scale):
).arrow()


def query_3(connection, dataset_path, scale):
def query_03(connection, dataset_path, scale):
return connection.execute(
f"""
with customer as (select * from read_parquet('{dataset_path}customer/*.parquet')),
Expand Down Expand Up @@ -121,7 +121,7 @@ def query_3(connection, dataset_path, scale):
).arrow()


def query_4(connection, dataset_path, scale):
def query_04(connection, dataset_path, scale):
return connection.execute(
f"""
with orders as (select * from read_parquet('{dataset_path}orders/*.parquet')),
Expand Down Expand Up @@ -152,7 +152,7 @@ def query_4(connection, dataset_path, scale):
).arrow()


def query_5(connection, dataset_path, scale):
def query_05(connection, dataset_path, scale):
return connection.execute(
f"""
with customer as (select * from read_parquet('{dataset_path}customer/*.parquet')),
Expand Down Expand Up @@ -190,7 +190,7 @@ def query_5(connection, dataset_path, scale):
).arrow()


def query_6(connection, dataset_path, scale):
def query_06(connection, dataset_path, scale):
return connection.execute(
f"""
with lineitem as (
Expand All @@ -210,7 +210,7 @@ def query_6(connection, dataset_path, scale):
).arrow()


def query_7(connection, dataset_path, scale):
def query_07(connection, dataset_path, scale):
return connection.execute(
f"""
with supplier as (select * from read_parquet('{dataset_path}supplier/*.parquet')),
Expand Down Expand Up @@ -262,7 +262,7 @@ def query_7(connection, dataset_path, scale):
).arrow()


def query_8(connection, dataset_path, scale):
def query_08(connection, dataset_path, scale):
return connection.execute(
f"""
with part as (select * from read_parquet('{dataset_path}part/*.parquet')),
Expand Down Expand Up @@ -317,7 +317,7 @@ def query_8(connection, dataset_path, scale):
).arrow()


def query_9(connection, dataset_path, scale):
def query_09(connection, dataset_path, scale):
return connection.execute(
f"""
with part as (select * from read_parquet('{dataset_path}part/*.parquet')),
Expand Down
18 changes: 9 additions & 9 deletions tests/tpch/test_duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,63 +46,63 @@ def _():
return _


def test_query_1(run, connection, dataset_path, scale):
def test_query_01(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_1(connection(), dataset_path, scale)

run(_)


def test_query_2(run, connection, dataset_path, scale):
def test_query_02(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_2(connection(), dataset_path, scale)

run(_)


def test_query_3(run, connection, dataset_path, scale):
def test_query_03(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_3(connection(), dataset_path, scale)

run(_)


def test_query_4(run, connection, dataset_path, scale):
def test_query_04(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_4(connection(), dataset_path, scale)

run(_)


def test_query_5(run, connection, dataset_path, scale):
def test_query_05(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_5(connection(), dataset_path, scale)

run(_)


def test_query_6(run, connection, dataset_path, scale):
def test_query_06(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_6(connection(), dataset_path, scale)

run(_)


def test_query_7(run, connection, dataset_path, scale):
def test_query_07(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_7(connection(), dataset_path, scale)

run(_)


def test_query_8(run, connection, dataset_path, scale):
def test_query_08(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_8(connection(), dataset_path, scale)

run(_)


def test_query_9(run, connection, dataset_path, scale):
def test_query_09(run, connection, dataset_path, scale):
def _():
duckdb_queries.query_9(connection(), dataset_path, scale)

Expand Down
18 changes: 9 additions & 9 deletions tests/tpch/test_polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def read_data(filename):
return pl.scan_parquet(fileglob)


def test_query_1(run, restart, dataset_path):
def test_query_01(run, restart, dataset_path):
def _():
var_1 = datetime(1998, 9, 2)
q = read_data(dataset_path + "lineitem")
Expand Down Expand Up @@ -78,7 +78,7 @@ def _():
run(_)


def test_query_2(run, restart, dataset_path):
def test_query_02(run, restart, dataset_path):
def _():
var_1 = 15
var_2 = "BRASS"
Expand Down Expand Up @@ -131,7 +131,7 @@ def _():
run(_)


def test_query_3(run, restart, dataset_path):
def test_query_03(run, restart, dataset_path):
def _():
var_1 = var_2 = datetime(1995, 3, 15)
var_3 = "BUILDING"
Expand Down Expand Up @@ -168,7 +168,7 @@ def _():
run(_)


def test_query_4(run, restart, dataset_path):
def test_query_04(run, restart, dataset_path):
def _():
var_1 = datetime(1993, 7, 1)
var_2 = datetime(1993, 10, 1)
Expand All @@ -190,7 +190,7 @@ def _():
run(_)


def test_query_5(run, restart, dataset_path):
def test_query_05(run, restart, dataset_path):
def _():
var_1 = "ASIA"
var_2 = datetime(1994, 1, 1)
Expand Down Expand Up @@ -228,7 +228,7 @@ def _():
run(_)


def test_query_6(run, restart, dataset_path):
def test_query_06(run, restart, dataset_path):
def _():
var_1 = datetime(1994, 1, 1)
var_2 = datetime(1995, 1, 1)
Expand All @@ -251,7 +251,7 @@ def _():
run(_)


def test_query_7(run, restart, dataset_path):
def test_query_07(run, restart, dataset_path):
def _():
nation_ds = read_data(dataset_path + "nation")
customer_ds = read_data(dataset_path + "customer")
Expand Down Expand Up @@ -300,7 +300,7 @@ def _():
run(_)


def test_query_8(run, restart, dataset_path):
def test_query_08(run, restart, dataset_path):
def _():
part_ds = read_data(dataset_path + "part")
supplier_ds = read_data(dataset_path + "supplier")
Expand Down Expand Up @@ -352,7 +352,7 @@ def _():
run(_)


def test_query_9(run, restart, dataset_path):
def test_query_09(run, restart, dataset_path):
def _():
part_ds = read_data(dataset_path + "part")
supplier_ds = read_data(dataset_path + "supplier")
Expand Down
18 changes: 9 additions & 9 deletions tests/tpch/test_pyspark.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def register_table(spark, path, name):
df.createOrReplaceTempView(name)


def test_query_1(spark, dataset_path):
def test_query_01(spark, dataset_path):
register_table(spark, dataset_path, "lineitem")

query = """select
Expand Down Expand Up @@ -190,7 +190,7 @@ def test_query_1(spark, dataset_path):
spark.sql(query).collect()


def test_query_2(spark, dataset_path):
def test_query_02(spark, dataset_path):
for name in ("part", "supplier", "partsupp", "nation", "region"):
register_table(spark, dataset_path, name)

Expand Down Expand Up @@ -244,7 +244,7 @@ def test_query_2(spark, dataset_path):
spark.sql(query).collect()


def test_query_3(spark, dataset_path):
def test_query_03(spark, dataset_path):
for name in ("customer", "orders", "lineitem"):
register_table(spark, dataset_path, name)

Expand Down Expand Up @@ -277,7 +277,7 @@ def test_query_3(spark, dataset_path):
spark.sql(query).collect()


def test_query_4(spark, dataset_path):
def test_query_04(spark, dataset_path):
for name in ("orders", "lineitem"):
register_table(spark, dataset_path, name)

Expand Down Expand Up @@ -308,7 +308,7 @@ def test_query_4(spark, dataset_path):
spark.sql(query).collect()


def test_query_5(spark, dataset_path):
def test_query_05(spark, dataset_path):
for name in (
"customer",
"orders",
Expand Down Expand Up @@ -348,7 +348,7 @@ def test_query_5(spark, dataset_path):
spark.sql(query).collect()


def test_query_6(spark, dataset_path):
def test_query_06(spark, dataset_path):
for name in ("lineitem",):
register_table(spark, dataset_path, name)

Expand All @@ -367,7 +367,7 @@ def test_query_6(spark, dataset_path):
spark.sql(query).collect()


def test_query_7(spark, dataset_path):
def test_query_07(spark, dataset_path):
for name in ("supplier", "lineitem", "orders", "customer", "nation"):
register_table(spark, dataset_path, name)

Expand Down Expand Up @@ -416,7 +416,7 @@ def test_query_7(spark, dataset_path):
spark.sql(query).collect()


def test_query_8(spark, dataset_path):
def test_query_08(spark, dataset_path):
for name in (
"part",
"supplier",
Expand Down Expand Up @@ -473,7 +473,7 @@ def test_query_8(spark, dataset_path):
spark.sql(query).collect()


def test_query_9(spark, dataset_path):
def test_query_09(spark, dataset_path):
for name in ("part", "supplier", "lineitem", "partsupp", "orders", "nation"):
register_table(spark, dataset_path, name)

Expand Down

0 comments on commit 459c006

Please sign in to comment.