polars.QueryOptFlags#
- class polars.QueryOptFlags(
- *,
- predicate_pushdown: None | bool = None,
- projection_pushdown: None | bool = None,
- simplify_expression: None | bool = None,
- slice_pushdown: None | bool = None,
- comm_subplan_elim: None | bool = None,
- comm_subexpr_elim: None | bool = None,
- cluster_with_columns: None | bool = None,
- collapse_joins: None | bool = None,
- check_order_observe: None | bool = None,
- fast_projection: None | bool = None,
The set of the optimizations considered during query optimization.
Warning
This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.
- __init__(
- *,
- predicate_pushdown: None | bool = None,
- projection_pushdown: None | bool = None,
- simplify_expression: None | bool = None,
- slice_pushdown: None | bool = None,
- comm_subplan_elim: None | bool = None,
- comm_subexpr_elim: None | bool = None,
- cluster_with_columns: None | bool = None,
- collapse_joins: None | bool = None,
- check_order_observe: None | bool = None,
- fast_projection: None | bool = None,
Methods
__init__
(*[, predicate_pushdown, ...])no_optimizations
()Remove selected optimizations.
none
(*[, predicate_pushdown, ...])Create new empty set off optimizations.
update
(*[, predicate_pushdown, ...])Update the current optimization flags.
Attributes
check_order_observe
Do not maintain order if the order would not be observed.
cluster_with_columns
Cluster sequential
with_columns
calls to independent calls.collapse_joins
Collapse slower joins with filters into faster joins.
comm_subexpr_elim
Elide duplicate expressions and caches their outputs.
comm_subplan_elim
Elide duplicate plans and caches their outputs.
fast_projection
Replace simple projections with a faster inlined projection that skips the expression engine.
predicate_pushdown
Apply predicates/filters as early as possible.
projection_pushdown
Only read columns that are used later in the query.
simplify_expression
Run many expression optimization rules until fixed point.
slice_pushdown
Pushdown slices/limits.