Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions queries/polars/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,17 @@ def obtain_engine_config() -> (


def run_query(query_number: int, lf: pl.LazyFrame) -> None:
streaming = settings.run.polars_old_streaming
new_streaming = settings.run.polars_streaming
streaming = settings.run.polars_streaming
eager = settings.run.polars_eager
gpu = settings.run.polars_gpu
cloud = settings.run.polars_cloud

if sum([eager, streaming, new_streaming, gpu, cloud]) > 1:
msg = "Please specify at most one of eager, streaming, new_streaming, cloud or gpu"
if sum([eager, streaming, gpu, cloud]) > 1:
msg = "Please specify at most one of eager, streaming, cloud or gpu"
raise ValueError(msg)
if settings.run.polars_show_plan:
print(
lf.explain( # type: ignore[call-arg]
streaming=streaming, new_streaming=new_streaming, optimized=eager
)
lf.explain(streaming=streaming, optimized=eager) # type: ignore[call-arg]
)

engine = obtain_engine_config()
Expand Down Expand Up @@ -197,7 +194,6 @@ def query(): # type: ignore[no-untyped-def]
query = partial(
lf.collect,
streaming=streaming,
new_streaming=new_streaming,
no_optimization=eager,
engine=engine,
)
Expand Down
1 change: 0 additions & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class Run(BaseSettings):

polars_show_plan: bool = False
polars_eager: bool = False
polars_old_streaming: bool = False
polars_streaming: bool = False
polars_cloud: bool = False
polars_gpu: bool = False # Use GPU engine?
Expand Down
Loading