Skip to content

Commit d4a1753

Browse files
committed
scan fix
1 parent 0d7b589 commit d4a1753

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "dean_utils"
7-
version="0.0.9"
7+
version="0.0.10"
88
authors=[
99
{ name="Dean MacGregor", email="powertrading121@gmail.com"}
1010
]

src/dean_utils/polars_extras.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@ def pl_scan_pq(
2424
row_count_offset: int = 0,
2525
parallel: ParallelStrategy = "auto",
2626
use_statistics: bool = True,
27-
hive_partitioning: bool = True,
2827
rechunk: bool = True,
2928
low_memory: bool = False,
3029
cache: bool = True,
31-
storage_options=stor,
30+
storage_options=None,
3231
retries: int = 0,
3332
) -> pl.LazyFrame:
3433
"""
@@ -61,6 +60,8 @@ def pl_scan_pq(
6160
Cache the result after reading.
6261
retries
6362
Number of retries if accessing a cloud instance fails."""
63+
if storage_options is None:
64+
storage_options = stor
6465
return pl.scan_parquet(
6566
f"abfs://{source}",
6667
n_rows=n_rows,
@@ -85,11 +86,10 @@ def pl_scan_hive(
8586
row_count_offset: int = 0,
8687
parallel: ParallelStrategy = "auto",
8788
use_statistics: bool = True,
88-
hive_partitioning: bool = True,
8989
rechunk: bool = True,
9090
low_memory: bool = False,
9191
cache: bool = True,
92-
storage_options=stor,
92+
storage_options=None,
9393
retries: int = 0,
9494
) -> pl.LazyFrame:
9595
"""
@@ -122,6 +122,8 @@ def pl_scan_hive(
122122
Cache the result after reading.
123123
retries
124124
Number of retries if accessing a cloud instance fails."""
125+
if storage_options is None:
126+
storage_options = stor
125127
return pl.scan_parquet(
126128
f"abfs://{source}",
127129
n_rows=n_rows,

0 commit comments

Comments
 (0)