Skip to content

Name the column in DataError for time zone values in every cursor #1217

Closed

Description

@laughingman7743

Part of #1212.

Summary

Time zone conversion failures raise DataError without the column name, and PandasCursor wraps them in OperationalError. Raise DataError naming the column in every cursor.

Facts

Measured on master ff4e468 (after #1224):

  • Cursor, S3FSCursor, and the fetch methods raise DataError for an unknown zone, an ambiguous local time, or a local time in a DST gap. The message names the value and the zone, but not the column.
  • PandasCursor raises OperationalError with the same message in whole reads.

Expected behavior

Each of these raises DataError with the column name, and for an unknown zone also the zone. Errors found by a chunked read raise when that chunk is read.

Years outside 1 to 9999 are out of scope (#1212): the errors that pandas, pyarrow, Polars, or Python raise for them pass through.

Activity

  1. added a commit that references this issue on Oct 17, 2026
  2. changed the title [-]Raise DataError for temporal conversion failures in every cursor[/-] [+]Name the column in DataError for time zone values in every cursor[/+] on Oct 17, 2026
  3. laughingman7743 commented on Oct 18, 2026

    @laughingman7743
    MemberAuthor

    The PandasCursor part is done in #1273: a timestamp with time zone value that PyAthena's conversion cannot convert, such as one with an ambiguous, nonexistent, or unknown zone, raises DataError naming the column, in whole and chunked reads, instead of an OperationalError that wraps it. When parse_dates, dtype, or converters is given to execute(), the default converter still runs per value as before, and an unknown zone raises OperationalError without the column name. The other cursors remain for this issue.

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