@@ -441,8 +441,7 @@ def _to_dataframe(
441
441
expr : ir .Expr ,
442
442
params : Mapping [ir .Expr , object ] | None = None ,
443
443
limit : int | None = None ,
444
- streaming : bool = False ,
445
- engine : Literal ["cpu" , "gpu" ] | pl .GPUEngine = "cpu" ,
444
+ engine : Literal ["cpu" , "gpu" , "streaming" ] | pl .GPUEngine = "cpu" ,
446
445
** kwargs : Any ,
447
446
) -> pl .DataFrame :
448
447
self ._run_pre_execute_hooks (expr )
@@ -452,7 +451,7 @@ def _to_dataframe(
452
451
limit = ibis .options .sql .default_limit
453
452
if limit is not None :
454
453
lf = lf .limit (limit )
455
- df = lf .collect (streaming = streaming , engine = engine )
454
+ df = lf .collect (engine = engine )
456
455
# XXX: Polars sometimes returns data with the incorrect column names.
457
456
# For now we catch this case and rename them here if needed.
458
457
expected_cols = tuple (table_expr .columns )
@@ -467,17 +466,11 @@ def execute(
467
466
* ,
468
467
params : Mapping [ir .Expr , object ] | None = None ,
469
468
limit : int | None = None ,
470
- streaming : bool = False ,
471
- engine : Literal ["cpu" , "gpu" ] | pl .GPUEngine = "cpu" ,
469
+ engine : Literal ["cpu" , "gpu" , "streaming" ] | pl .GPUEngine = "cpu" ,
472
470
** kwargs : Any ,
473
471
):
474
472
df = self ._to_dataframe (
475
- expr ,
476
- params = params ,
477
- limit = limit ,
478
- streaming = streaming ,
479
- engine = engine ,
480
- ** kwargs ,
473
+ expr , params = params , limit = limit , engine = engine , ** kwargs
481
474
)
482
475
if isinstance (expr , (ir .Table , ir .Scalar )):
483
476
return expr .__pandas_result__ (df .to_pandas ())
@@ -500,17 +493,11 @@ def to_polars(
500
493
* ,
501
494
params : Mapping [ir .Expr , object ] | None = None ,
502
495
limit : int | None = None ,
503
- streaming : bool = False ,
504
- engine : Literal ["cpu" , "gpu" ] | pl .GPUEngine = "cpu" ,
496
+ engine : Literal ["cpu" , "gpu" , "streaming" ] | pl .GPUEngine = "cpu" ,
505
497
** kwargs : Any ,
506
498
):
507
499
df = self ._to_dataframe (
508
- expr ,
509
- params = params ,
510
- limit = limit ,
511
- streaming = streaming ,
512
- engine = engine ,
513
- ** kwargs ,
500
+ expr , params = params , limit = limit , engine = engine , ** kwargs
514
501
)
515
502
return expr .__polars_result__ (df )
516
503
@@ -519,19 +506,13 @@ def _to_pyarrow_table(
519
506
expr : ir .Expr ,
520
507
params : Mapping [ir .Expr , object ] | None = None ,
521
508
limit : int | None = None ,
522
- streaming : bool = False ,
523
- engine : Literal ["cpu" , "gpu" ] | pl .GPUEngine = "cpu" ,
509
+ engine : Literal ["cpu" , "gpu" , "streaming" ] | pl .GPUEngine = "cpu" ,
524
510
** kwargs : Any ,
525
511
):
526
512
from ibis .formats .pyarrow import PyArrowData
527
513
528
514
df = self ._to_dataframe (
529
- expr ,
530
- params = params ,
531
- limit = limit ,
532
- streaming = streaming ,
533
- engine = engine ,
534
- ** kwargs ,
515
+ expr , params = params , limit = limit , engine = engine , ** kwargs
535
516
)
536
517
return PyArrowData .convert_table (df .to_arrow (), expr .as_table ().schema ())
537
518
0 commit comments