Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Sep 7, 2023
1 parent 80d156d commit 0815aa1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/cudf/cudf/_lib/scalar.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ cdef class DeviceScalar:
pa_scalar = pa.scalar(value, type=pa.from_numpy_dtype(self._dtype))
self.c_value = pylibcudf.Scalar(pa_scalar)
set_dtype = False
# TODO: For datetime and timedeltas need to find a way to not overflow
# for large values. The problem is that numpy supports larger values,
# but Python's built-in objects do not, and currently in
# pylibcudf.Scalar.__init__ we rely on as_py to toss the scalar into an
# array because pa.array doesn't understand pa.Scalar instances.
elif pd.api.types.is_datetime64_dtype(self._dtype):
_set_datetime64_from_np_scalar(
self.c_value.c_obj, value, self._dtype, valid
Expand Down

0 comments on commit 0815aa1

Please sign in to comment.