You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PolarsCursor fails with the deprecated dtypes reader option #1111
PolarsCursor.execute(..., dtypes={...}) fails when the result is read as CSV.
The result set always passes its own schema_overrides (the column types from Athena's metadata) to polars.read_csv() / polars.scan_csv(), and Polars rejects receiving both the deprecated dtypes name and schema_overrides:
TypeError: `'read_csv'` received both `'dtypes'` and `'schema_overrides'` as arguments; `'dtypes'` was deprecated in version 0.20.31, use `'schema_overrides'` instead
PyAthena raises it as OperationalError after the query has run. schema_overrides= works, so the only effect is on callers still using the alias deprecated since Polars 0.20.31 (PyAthena requires polars>=1.39.0).
The other code paths that special-case schema_overrides given to execute() (_get_timestamp_dtypes(), the new_columns handling in _read_csv() and the chunked CSV reader in pyathena/polars/result_set.py) do not recognize dtypes either.
Options
Treat dtypes as schema_overrides in the result set (drop the default schema_overrides and apply the same new_columns/timestamp rules).
Document schema_overrides as the supported name and leave the deprecated alias to Polars.
Activity