-
Notifications
You must be signed in to change notification settings - Fork 608
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
refactor(api): remove casting from timestamp to integer and integer to timestamp #9854
Comments
@jcrist you had some comments/opions about this part while we were on triage.
We can do this easily in the new |
I think you mean Integer value in the last bit. IntervalValue.as_timestamp() isn't a meaningful operation in general. |
Yup, you are right! |
@jcrist I lost track of the other PR that was tackling part one, and I can't seem to find it, can you reference it here and close this one if it has been merged. |
This was resolved by #9856 |
These two operations differ in our backends and IMO are confusing foot guns that make it hard to write portable Ibis code due to differing support for different units across backends. It also doesn't round trip, even within the same backend.
For the
timestamp -> integer
case, we can make anepoch(unit)
API onTimestampValue
.For the
integer -> timestamp
case, we have theIntegerValue.to_timestamp
method which allows specifying units. For that case I think we should also make the units required and not default to seconds.The text was updated successfully, but these errors were encountered: