From 62b2e7d5009de5fc7d4ca5953992faaea4841caf Mon Sep 17 00:00:00 2001 From: ritchie Date: Tue, 25 Feb 2025 15:47:24 +0100 Subject: [PATCH] feat: Activate all optimizations in sinks --- py-polars/polars/lazyframe/frame.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/py-polars/polars/lazyframe/frame.py b/py-polars/polars/lazyframe/frame.py index ff0d4bd47e9c..46ee33f618c1 100644 --- a/py-polars/polars/lazyframe/frame.py +++ b/py-polars/polars/lazyframe/frame.py @@ -2919,7 +2919,10 @@ def _set_sink_optimizations( simplify_expression: bool = True, slice_pushdown: bool = True, collapse_joins: bool = True, + cluster_with_columns: bool = True, no_optimization: bool = False, + comm_subplan_elim: bool = False, + comm_subexpr_elim: bool = False, _check_order: bool = True, ) -> PyLazyFrame: if no_optimization: @@ -2935,9 +2938,9 @@ def _set_sink_optimizations( projection_pushdown=projection_pushdown, simplify_expression=simplify_expression, slice_pushdown=slice_pushdown, - comm_subplan_elim=False, - comm_subexpr_elim=False, - cluster_with_columns=False, + comm_subplan_elim=comm_subplan_elim, + comm_subexpr_elim=comm_subexpr_elim, + cluster_with_columns=cluster_with_columns, collapse_joins=collapse_joins, streaming=True, _eager=False,