We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Duration
Is your feature request related to a problem? Please describe.
I want to be able to cast a timedelta to a duration the same way we implicitly convert it if using from_pydict
timedelta
from_pydict
import daft import datetime df = daft.from_pydict( { "time_delta": [datetime.timedelta(days=1), datetime.timedelta(days=2)], } ) df.collect() ╭────────────────────────╮ │ time_delta │ │ --- │ │ Duration[Microseconds] │ ╞════════════════════════╡ │ 86400000000 │ ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤ │ 172800000000 │ ╰────────────────────────╯ (Showing first 2 of 2 rows)
Describe the solution you'd like
df.select(daft.lit(datetime.timedelta(days=1)).cast(daft.DataType.duration('us')))
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Closed with #3011
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
I want to be able to cast a
timedelta
to a duration the same way we implicitly convert it if usingfrom_pydict
Describe the solution you'd like
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: