polars.lazyframe.resolver.LazyFrameResolver.resolve_lazyframe#

abstract LazyFrameResolver.resolve_lazyframe(
*,
projection: list[str] | None,
limit: int | None,
filters: list[FilterExpr],
filter_columns: list[str],
filter_drop_columns_idx: int | None,
existing_resolved_version_key: str | None,
) → LazyFrame | tuple[LazyFrame | None, ResolvedLazyFrameProps][source]#

Resolve to a LazyFrame with the provided limit, filters and projection.

Parameters:
projection

Columns to project. If set to None, all columns should be projected.

An empty list means that only the row count is needed. Preserve the height of the result, for example with lf.drop("*").

In the presence of filters, this may not contain all of the column names being referenced by filters. These can be found in filter_columns.

limit

Row limit.

filters

Filters to be applied.

filter_columns

Columns used by filter exprs.

filter_drop_columns_idx

Columns at and beyond this index in projection are only used for evaluation of the filter mask, and not afterwards.

If this is not None, projection is also guaranteed to not be None.

existing_resolved_version_key

Version key of a previously resolved LazyFrame. Can be used to skip re-resolving.