-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add postgres to_date
function
#1799
Comments
My understanding is that this ends up being pretty hard, and it looks like arrow/datafusion's date+timestamp formats play a little fast and loose with timezones/leapseconds/calendars/etc. (and it seems like you'd need to use/link chrono for this? it seems like datafusion uses this to create some timestamps internally but not for manipulating or parsing user data. it seems reasonable that we'd need to write/provide function to perform this cast on our end, and probably ensure that users also pass a format (or a nice name for well known formats) and also use a library to handle the timezone things.) |
we should be able use chrono's strptime to handle this. I believe polars |
to_date
function
|
I ran into this. A work around is casting to We are also missing See also: https://www.postgresql.org/docs/current/functions-formatting.html |
Seems likely that this will be implemented upstream apache/datafusion#9147 |
Given the test data
userdata1.parquet
, I'd like to convert thebirthdate' field to a
Date` field.I've tried
The datafusion docs don't seem to have any builtin functions for parsing strings to dates
The text was updated successfully, but these errors were encountered: