-
Notifications
You must be signed in to change notification settings - Fork 913
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
Implement cudf-polars datetime extraction methods #16500
Implement cudf-polars datetime extraction methods #16500
Conversation
/ok to test |
/ok to test |
/ok to test |
/ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally this seems on target! We will have some follow-up work to implement single-kernel solutions for micros / nanos but otherwise all seems fine.
"nanosecond", | ||
] | ||
|
||
unsupported_extract_fields = ["millennium"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could extract this from years rather than not support it…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a rough solution for maintaining 100% coverage of the code, specifically getting us to hit the error line that complains about a rust node that is exposed but that we don't support. Because of this, adding millennium
would in some sense just kick the can down the road until we come to a day where all the rust nodes are supported in python as well and we can get rid of the error.
Instead of doing that I went with an approach that we liked in a similar situation where we monkeypatch things to trigger an error at the desired location, regardless of what we support. See the latest commits for details and let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few additional comments in the same vein as @bdice's
Co-authored-by: Bradley Dice <[email protected]> Co-authored-by: Lawrence Mitchell <[email protected]>
Co-authored-by: Lawrence Mitchell <[email protected]>
/ok to test |
Can fix the test that asserts that dtypes don't match for |
/ok to test |
# libcudf can lose data here. | ||
# https://github.com/rapidsai/cudf/issues/16196 | ||
assert_gpu_result_equal(q) | ||
q = ldf.select(field(pl.col("dates").dt)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the dtypes should match, so we need to remove the check_dtypes=False part below
/ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brandon-b-miller and @lithomas1!
Description
Checklist