Skip to content

PandasCursor drops the sign of negative years and reads years after 9999 as text #1215

Closed as not planned

Description

@laughingman7743

Part of #1212.

Summary

PandasCursor reads a negative year as a positive one, and reads a column with a year after 9999 as text.

Facts

Measured on master b2d7aa2 (pandas 3.0.6), the same for whole and chunked reads and for managed results:

Athena text Type DataFrame
-0001-01-02 03:04:05.123 timestamp datetime64[us], Timestamp('1-01-02 03:04:05.123000')
-0001-01-02 date datetime64[us], Timestamp('1-01-02 00:00:00')
+11020-01-02 03:04:05.123 timestamp str column
+11020-01-02 date str column

With UNLOAD, date values outside 1 to 9999 raise OperationalError instead.

Expected behavior

Following #1212, years outside 1 to 9999 raise DataError, and the column keeps its temporal dtype. pandas keeps the sign when it parses with format="ISO8601"; the fix must be measured for elapsed time and peak RSS on ordinary data.

Activity

  1. laughingman7743 commented on Oct 17, 2026

    @laughingman7743
    MemberAuthor

    Closing: years outside 1 to 9999 are out of scope (#1212). PyAthena does not detect them; what pandas returns or raises for them is pandas' behavior.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions