-
Notifications
You must be signed in to change notification settings - Fork 72
Fix TIMESTAMP / DATE scalars, add support for DATE column casting #343
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
Fix TIMESTAMP / DATE scalars, add support for DATE column casting #343
Conversation
|
@charlesbluca is rapidsai/cudf#7880 in the critical path for this PR, or are there relatively straightforward workarounds? |
|
Need to look through the code again to make sure this is accurate, but IIRC another path forward here would be to add support for casting pandas timezoned datetime / cudf datetime columns to |
Codecov Report
@@ Coverage Diff @@
## main #343 +/- ##
==========================================
+ Coverage 88.92% 89.09% +0.16%
==========================================
Files 68 68
Lines 3333 3337 +4
Branches 651 653 +2
==========================================
+ Hits 2964 2973 +9
+ Misses 298 289 -9
- Partials 71 75 +4
Continue to review full report at Codecov.
|
This is a continuation of #298 that also aims to implement
CAST(... AS DATE)properly, as up until now that would work identically toCAST(... AS TIMESTAMP):np.datetime64instead ofdatetime.datetimefor compatibility with Pandas; for whatever reasondatetime.datetimeswork in cuDF, which should probably be documented somewherenp.dtype("datetime64[D]")and TIMESTAMP scalars tonp.dtype("datetime64[ns]"), so that DATE filters work as expectedCAST (... AS DATE)using the datetime column'sdt.dateattribute; this currently doesn't work in dask-cuDF as it is dependent on the datetime accessor of cuDF, which doesn't have adateattributeastype("datetime64[D]"); in Pandas this only applies for timezoned datetimes, and in cuDF this applies for all datetimesCloses #296
Closes #298