-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 from_unixtime
function
#2871
Comments
@andygrove Is this the right place to begin with https://github.com/apache/arrow-datafusion/blob/master/datafusion/expr/src/built_in_function.rs#L150 ? |
@waitingkuo https://github.com/apache/arrow-datafusion/blob/master/CONTRIBUTING.md#how-to-add-a-new-scalar-function this can be some start for you |
#2324 please check this PR also |
thank you @comphead ! |
@comphead i finally figured out how to add a new function, thank you~ @andygrove |
@waitingkuo Can you please refer me where you have added that code? I only found 2 references of the function:
But could not find the actual function. I want to add some example usage doc in the function. As it looks empty without any example: crates doc . Or if you can tell how I should add some doc. The contribution guide says the function should be added into datetime expression. But could not find that function there. |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In the SO post https://stackoverflow.com/questions/72888852/extract-year-month-day-from-unix-timestamp-column-in-rust-datafusion-dataframe/72941102#72941102 the user needed help with translating a unixtime to a timestamp. The solution now is to use a cast and this is verbose and not obvious. It would be nice to have a specific
from_unixtime
function.Describe the solution you'd like
See https://spark.apache.org/docs/2.3.0/api/sql/index.html#from_unixtime for Spark's version
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: