polars.Engine#

class polars.Engine[source]#

Base class for query execution engines.

Subclass this to plug a new backend into Polars.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

collect(lf, *, optimizations[, background, ...])

Execute lf, returning a DataFrame or a background query handle.

collect_all(lfs, *, optimizations)

Execute several queries, potentially in parallel.

collect_all_async(lfs, *, optimizations[, ...])

Execute several queries asynchronously.

collect_async(lf, *, optimizations[, gevent])

Execute lf asynchronously.

collect_batches(lf, *, optimizations[, ...])

Execute lf, yielding its result in batches.

execute(lf, *, optimizations)

Execute the query into a QueryResult.

sink_batches(lf, function, *, chunk_size, ...)

See polars.LazyFrame.sink_batches().

sink_csv(lf, path, *, include_bom, ...)

See polars.LazyFrame.sink_csv().

sink_ipc(lf, path, *, compression, ...)

See polars.LazyFrame.sink_ipc().

sink_ndjson(lf, path, *, compression, ...)

See polars.LazyFrame.sink_ndjson().

sink_parquet(lf, path, *, compression, ...)

See polars.LazyFrame.sink_parquet().

Attributes

name

Engine identifier.

plan_engine

Engine name used to render query plans.