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

Remove cudf._lib.timezone in favor of inlining pylibcudf #17366

Merged
merged 5 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python/cudf/cudf/_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ set(cython_sources
string_casting.pyx
strings_udf.pyx
text.pyx
timezone.pyx
transform.pyx
types.pyx
utils.pyx
Expand Down
1 change: 0 additions & 1 deletion python/cudf/cudf/_lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
strings,
strings_udf,
text,
timezone,
)

MAX_COLUMN_SIZE = np.iinfo(np.int32).max
Expand Down
10 changes: 0 additions & 10 deletions python/cudf/cudf/_lib/timezone.pyx

This file was deleted.

11 changes: 8 additions & 3 deletions python/cudf/cudf/core/_internals/timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
import numpy as np
import pandas as pd

import pylibcudf as plc

import cudf
from cudf._lib.timezone import make_timezone_transition_table
from cudf._lib.column import Column

if TYPE_CHECKING:
from cudf.core.column.datetime import DatetimeColumn
Expand Down Expand Up @@ -109,11 +111,14 @@ def _find_and_read_tzfile_tzdata(


def _read_tzfile_as_columns(
tzdir, zone_name: str
tzdir: str, zone_name: str
) -> tuple[DatetimeColumn, TimeDeltaColumn]:
transition_times_and_offsets = make_timezone_transition_table(
plc_table = plc.io.timezone.make_timezone_transition_table(
tzdir, zone_name
)
transition_times_and_offsets = [
Column.from_pylibcudf(col) for col in plc_table.columns()
]

if not transition_times_and_offsets:
from cudf.core.column.column import as_column
Expand Down
Loading