Skip to content

Include result serialization in query timings for dataframe entries - #1585

Open
alexey-milovidov wants to merge 10 commits into
mainfrom
issue-1397-time-result-serialization
Open

Include result serialization in query timings for dataframe entries#1585
alexey-milovidov wants to merge 10 commits into
mainfrom
issue-1397-time-result-serialization

Conversation

@alexey-milovidov

Copy link
Copy Markdown
Member

Fixes #1397.

ClickBench requires back-to-back runtimes that include sending the query result back to the client (README, "Output Suppression"). As @vogelsgesang pointed out, the polars entry stopped the timer right after query execution and rendered the result afterwards. The sibling in-process dataframe entries built on the same server.py template (polars-dataframe, pandas, dask, daft-parquet, daft-parquet-partitioned) had the same flaw, so this fixes all six.

The fix moves result rendering inside the timed section — matching what duckdb-dataframe (str(rel) in the timing) and chdb-dataframe (Pretty format in the timing) already do — and additionally disables display truncation so the full result is rendered, since a truncated render would itself be partial output suppression:

  • polars, polars-dataframe: pl.Config.set_tbl_rows(-1), set_tbl_cols(-1), set_tbl_width_chars(-1), set_fmt_str_lengths(65535) at startup; str()/repr() of the collected result moved inside the timing. Verified against a live server: 25-row results render all rows, Q30-style 90-column results render all columns, long strings are not truncated.
  • pandas, dask: display.max_rows/max_columns/width/max_colwidth set to unlimited; str() moved inside the timing (dask results are pandas objects after dask.compute()).
  • daft-parquet, daft-parquet-partitioned: collect(num_preview_rows=None) so __str__ renders every row (default previews only 8), plus to_pydict() inside the timing as the fetchall() equivalent, because daft's table repr always truncates long cell contents.

Entries already compliant and untouched: duckdb-dataframe, chdb-dataframe, duckdb-memory (fetchall() in the timing), sirius (CLI output captured in the timing).

All ClickBench query results are small (LIMIT 10/25), so the added rendering cost is well below the 1 ms timing resolution — this is a methodology fix and existing results don't need to be re-run.

🤖 Generated with Claude Code

ClickBench requires back-to-back runtimes that include sending the query
result back to the client (README, "Output Suppression"). The polars
entry (and the sibling in-process dataframe entries that share its
server.py template) stopped the timer right after query execution and
rendered the result afterwards.

Move result rendering inside the timed section — matching what
duckdb-dataframe and chdb-dataframe already do — and disable display
truncation so the full result (every row, column, and complete cell
contents) is rendered:

- polars, polars-dataframe: pl.Config tbl_rows/tbl_cols/tbl_width_chars
  set to -1 and fmt_str_lengths raised; str()/repr() moved inside the
  timing.
- pandas, dask: pandas display options set to unlimited; str() moved
  inside the timing (dask results are pandas objects).
- daft-parquet, daft-parquet-partitioned: collect(num_preview_rows=None)
  so __str__ renders every row, plus to_pydict() inside the timing as
  the fetchall() equivalent (daft's table repr truncates long cells).

All ClickBench query results are small (LIMIT 10/25), so the rendering
cost is negligible; this is a methodology fix, not a perf change.

Closes #1397

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov self-assigned this Aug 24, 2026
@alexey-milovidov alexey-milovidov added the machine:all PR benchmark on every machine type label Aug 24, 2026
@alexey-milovidov
alexey-milovidov deployed to benchmark-approval August 24, 2026 18:18 — with GitHub Actions Active
…ars (c6a.2xlarge, c6a.4xlarge, c6a.metal, c7a.metal-48xl, c8g.4xlarge, c8g.metal-48xl)
@github-actions

Copy link
Copy Markdown
Contributor

Results for daft-parquet are ready for: c6a.metal, c7a.metal-48xl, c8g.metal-48xl.
Results for daft-parquet-partitioned are ready for: c6a.2xlarge, c6a.4xlarge, c6a.metal, c7a.metal-48xl, c8g.4xlarge, c8g.metal-48xl.
Results for polars are ready for: c6a.2xlarge, c6a.4xlarge, c6a.metal, c7a.metal-48xl, c8g.4xlarge, c8g.metal-48xl.
The result files are committed as e58ab12.
The run of dask on c8g.4xlarge did not produce results.
The run of pandas on c6a.2xlarge did not produce results.
The run of pandas on c6a.4xlarge did not produce results.
The run of pandas on c6a.large did not produce results.
The run of pandas on c6a.xlarge did not produce results.
The run of pandas on c8g.4xlarge did not produce results.
The run of pandas on t3a.small did not produce results.
The run of polars-dataframe on c6a.2xlarge did not produce results.
The run of polars-dataframe on c6a.4xlarge did not produce results.
The run of polars-dataframe on c6a.large did not produce results.
The run of polars-dataframe on c6a.xlarge did not produce results.
The run of polars-dataframe on c8g.4xlarge did not produce results.
The run of polars-dataframe on t3a.small did not produce results.

Logs:

….2xlarge, c6a.4xlarge, c6a.xlarge, c8g.4xlarge)
@github-actions

Copy link
Copy Markdown
Contributor

Results for daft-parquet are ready for: c6a.2xlarge, c6a.4xlarge, c8g.4xlarge.
Results for daft-parquet-partitioned are ready for: c6a.xlarge.
The result files are committed as 88a2418.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for polars-dataframe are ready for: c6a.metal, c7a.metal-48xl, c8g.metal-48xl.
The result files are committed as 4e3cab9.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for daft-parquet are ready for: c6a.xlarge.
Results for dask are ready for: c6a.metal, c7a.metal-48xl, c8g.metal-48xl.
Results for polars are ready for: c6a.xlarge.
The result files are committed as 4d7bff4.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for pandas are ready for: c8g.metal-48xl.
The result files are committed as 878257e.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for pandas are ready for: c6a.metal, c7a.metal-48xl.
The result files are committed as b2b2bb8.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for daft-parquet-partitioned are ready for: c6a.large.
The result files are committed as 790248d.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for polars are ready for: c6a.large.
The result files are committed as 64dd970.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

Results for daft-parquet are ready for: c6a.large.
The result files are committed as 1f6571a.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

The run of daft-parquet on t3a.small did not produce results.
The run of daft-parquet-partitioned on t3a.small did not produce results.
The run of dask on c6a.2xlarge did not produce results.
The run of dask on c6a.large did not produce results.
The run of dask on c6a.xlarge did not produce results.
The run of dask on t3a.small did not produce results.
The run of polars on t3a.small did not produce results.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

The run of dask on c6a.4xlarge did not produce results.

Logs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

machine:all PR benchmark on every machine type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polars reports numbers without result serialization

1 participant