StageStatistics#

class polars_cloud.StageStatistics(inner: pcr.StageStatsPy)

Information about a query stage.

Attributes:

num_workers_used

The number of workers used by this stage.

property num_workers_used: int

The number of workers used by this stage.

Examples

>>> # run a query
>>> in_progress = (
...     pl.scan_parquet("datasets/").sort("a").remote().distributed().execute()
... )  
>>> # await the result
>>> result = in_progress.await_result()  
>>> # inspect how many workers used in stage 0
>>> assert result.stage_statistics(0).num_workers_used > 1