Skip to content

Commit c380697

Browse files
committed
fixup ci
1 parent 277c3cf commit c380697

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ repos:
1313
hooks:
1414
- id: mypy
1515
additional_dependencies: ['polars==0.20.10', 'pytest==8.0.1']
16-
exclude: utils
16+
exclude: utils|tpch

tpch/q2.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import polars
55
import pandas as pd
66

7-
from narwhals import translate_frame
7+
from narwhals import translate_frame, get_namespace, to_native
88

99
polars.Config.set_tbl_cols(10)
1010
pd.set_option("display.max_columns", 10)
@@ -21,11 +21,12 @@ def q2(
2121
var_2 = "BRASS"
2222
var_3 = "EUROPE"
2323

24-
region_ds, pl = translate_frame(region_ds_raw, is_lazy=True)
25-
nation_ds, _ = translate_frame(nation_ds_raw, is_lazy=True)
26-
supplier_ds, _ = translate_frame(supplier_ds_raw, is_lazy=True)
27-
part_ds, _ = translate_frame(part_ds_raw, is_lazy=True)
28-
part_supp_ds, _ = translate_frame(part_supp_ds_raw, is_lazy=True)
24+
region_ds = translate_frame(region_ds_raw, is_lazy=True)
25+
nation_ds = translate_frame(nation_ds_raw, is_lazy=True)
26+
supplier_ds = translate_frame(supplier_ds_raw, is_lazy=True)
27+
part_ds = translate_frame(part_ds_raw, is_lazy=True)
28+
part_supp_ds = translate_frame(part_supp_ds_raw, is_lazy=True)
29+
pl = get_namespace(region_ds)
2930

3031
result_q2 = (
3132
part_ds.join(part_supp_ds, left_on="p_partkey", right_on="ps_partkey")
@@ -64,7 +65,7 @@ def q2(
6465
.head(100)
6566
)
6667

67-
return q_final.collect().to_native()
68+
return to_native(q_final.collect())
6869

6970

7071
region_ds = polars.scan_parquet("../tpch-data/region.parquet")

0 commit comments

Comments
 (0)