Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] attempted construction of interval index with timestamps hits recursion error #14004

Closed
wence- opened this issue Aug 30, 2023 · 0 comments · Fixed by #14006
Closed

[BUG] attempted construction of interval index with timestamps hits recursion error #14004

wence- opened this issue Aug 30, 2023 · 0 comments · Fixed by #14006
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@wence-
Copy link
Contributor

wence- commented Aug 30, 2023

Describe the bug

Since #13956, attempting to construct an interval index from a pandas with a non-None timezone hits a RecursionError in as_column. Previously we would get an immediate failure because the attempt to round-trip into pyarrow would not succeed.

Steps/Code to reproduce bug

from pandas import (
    IntervalIndex,
    date_range,
    Timestamp
)
import cudf

tz = "US/Eastern"
freq = "M"

start, end = Timestamp("20180101", tz=tz), Timestamp("20181231", tz=tz)
breaks = date_range(start=start, end=end, freq=freq)

expected = IntervalIndex.from_breaks(breaks, closed="both")

cudf.from_pandas(expected)

Expected behavior

This should fail, but do so fast.

@wence- wence- added the bug Something isn't working label Aug 30, 2023
@galipremsagar galipremsagar added the Python Affects Python cuDF API. label Aug 30, 2023
rapids-bot bot pushed a commit that referenced this issue Aug 30, 2023
…Dtype` (#14006)

closes #14004 

This PR raises an error when an `IntervalIndex` contains a timezone-aware sub-type so that we don't go into infinite recursion.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)

URL: #14006
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants