Skip to content

Benchmark the temporal type conversion changes of 4.2.0 #1287

Closed

Description

@laughingman7743

Moved from #1221 (part of #1212), whose documentation part was done in #1284.

Summary

Measure the elapsed time and peak RSS of the readers whose temporal conversion changed in 4.2.0, on the commit planned for 4.2.0, in the combined benchmark #1288 with #1159 and #1162.

This run measures 4.2.0 only. The comparison with the code before the changes comes from the local measurements of each PR (below). The combined run adds absolute values against real S3 and at the benchmark's scales.

Scope

Readers and paths whose conversion changed

Harness change

The current shapes (flat, nested, json) keep "timestamp" as a bigint (benchmarks/pyathena_bench/config.py, benchmarks/DATASET.md), so none of them converts a temporal value. Add a temporal shape:

  • Columns, in config.py: derived from the same snapshot, so that no new input data is needed. For example:
    • a timestamp(3) from from_unixtime("timestamp" / 1e6);
    • a date;
    • timestamp with time zone columns in UTC, in a zone name, and in an offset;
    • time, if useful;
    • the flat scalar columns, so the result keeps a realistic width.
  • Cases, in cases.py: add the shape to SHAPES and matrix(). UNLOAD cannot write time or with time zone types, or timestamps other than TIMESTAMP(3). Either give UNLOAD cases a projection of TIMESTAMP(3) and date only, or mark them unsupported, as the json shape does.
  • Update the harness tests under benchmarks/tests, benchmarks/README.md, and benchmarks/DATASET.md.
  • Merge this before the commit planned for 4.2.0, because the run measures that commit.

Out of scope: running the harness against v4.1.0. The harness uses the workspace's PyAthena, and the PR measurements already cover the comparison.

Local measurements so far (before and after)

The PRs measured on local files, without S3:

Activity

  1. laughingman7743 commented on Oct 19, 2026

    @laughingman7743
    MemberAuthor

    Measured in the combined 4.2.0 run (#1288), recorded in #1310 (benchmarks/history/2026-10-19-9e99caa8.md, section "The temporal workload" and finding 6), in both Polars environments.

    At 1 million rows, client result time, temporal against flat:

    • Cursor rows: 304.9 s against 217.6 s.
    • S3FSCursor rows: 88.5 s against 29.3 s.
    • The fetch methods of PandasCursor, ArrowCursor, and PolarsCursor on CSV results: 26.8, 37.9, and 34.0 s. On UNLOAD results, which hold no time zone or time columns, they took 2.0, 3.4, and 1.5 s.
    • PandasCursor's native CSV read: 24.0 s against 3.8 s. Wrangler CSV: 29.3 s against 6.0 s.
    • Native UNLOAD and CTAS reads, which add only event_time and event_date, stayed within 0.3 s of the flat workload.

    At 10 million rows, PandasCursor's CSV read with 100,000-row chunks took 163.7 s of client result time, against 76.5 s without chunks.

    The improvement candidates are filed as #1308. Closed by #1310.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions