Repository navigation
Breaking changes
- The asyncio SQLAlchemy adapter classes in
pyathena.aio.sqlalchemy.baseare renamed, with no aliases for the old names:AsyncAdapt_pyathena_cursor→AthenaAioAdaptedCursor,AsyncAdapt_pyathena_connection→AthenaAioAdaptedConnection,AsyncAdapt_pyathena_dbapi→AthenaAioAdaptedDBAPI(#1151). Code that imports the old names must use the new ones. Engines created with theawsathena+aio*URLs are unaffected.
Behavior changes
- PandasCursor parses CSV results with
jsoncolumns with pandas' defaultlow_memory=Trueand converts thejsoncolumns after parsing (#1141). pandas now applies these options to the JSON text instead of the converted value:parse_datesnaming ajsoncolumn no longer parses a JSON string such as"2020-01-01", which keeps its quotes; cast in SQL instead.- With
engine="python"and NA options such askeep_default_na=True, a JSON string that matches an NA token, such as"NA", stays a string; SQL NULL is stillNone.
Benchmark
The benchmark of this release is in benchmarks/history/2026-10-13-437276e1.md and benchmarks/history/2026-10-13-437276e1-filesystem.md (#1157). Highlights:
- PandasCursor reads CSV results faster than in 4.0.0, for example 10 million flat rows in 74 seconds instead of 110 (#1134, #1144).
- Chunked UNLOAD reads in PandasCursor and PolarsCursor stay at about 600 MiB for 10 million rows (#1135, #1143).
What's Changed
- Run benchmark fleets on Spot hosts that retire when done by @laughingman7743 in #1129
- Record the PyAthena 4.0.0 large-data benchmark run by @laughingman7743 in #1130
- Prefetch CSV result files while pandas parses them by @laughingman7743 in #1134
- Read chunked UNLOAD results in bounded memory by @laughingman7743 in #1135
- Close asyncio cursor result sets in a thread by @laughingman7743 in #1142
- Benchmark read_sql_query and trim the next benchmark selection by @laughingman7743 in #1146
- Start chunked UNLOAD reads sooner and pre-buffer large Parquet files one row group at a time by @laughingman7743 in #1143
- Convert json CSV columns after parsing instead of forcing low_memory=False by @laughingman7743 in #1141
- Prefetch CSV results in S3FSCursor and chunked reads, read Arrow CSV in parallel by @laughingman7743 in #1144
- Resume benchmark fleet jobs after Spot interruptions by @laughingman7743 in #1145
- Rename the asyncio SQLAlchemy adapter classes to CapWords and enforce N801 by @laughingman7743 in #1151
- Document the fsspec cache types that cache_type accepts by @laughingman7743 in #1150
- Add a filesystem suite comparing S3FileSystem and AioS3FileSystem by @laughingman7743 in #1152
- Allow c8gn.2xlarge benchmark hosts for the filesystem suite by @laughingman7743 in #1154
- Generalize the parallel read-ahead and read small UNLOAD files in parallel ranges by @laughingman7743 in #1153
Full Changelog: v4.0.0...v4.1.0