Skip to content

Segfaults when querying timestamptz outside of legal pandas range #208

@glentakahashi

Description

@glentakahashi

What happens?

When querying a timestamptz outside valid pandas ranges, pandas will segfault when attempting to render the table, rather than throw an error.

tested on pandas versions 2.2.3 and 2.3.3

To Reproduce

import duckdb
conn = duckdb.connect(database=":memory:")
conn.execute("SET TimeZone = 'America/Los_Angeles'") # Segfaults
# conn.execute("SET TimeZone = 'UTC'") # does not segfault
df = conn.execute("SELECT '0001-01-01 00:00:00'::timestamptz").df()
print(df)

OS:

x86_64

DuckDB Version:

1.4.2

DuckDB Client:

Python

Hardware:

No response

Full Name:

Glen Takahashi

Affiliation:

Hex Technologies

Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

  • Yes, I have

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant data sets for reproducing the issue?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions