-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Is your feature request related to a problem or challenge?
Asked about in Discord
DataFusion doesn't have any time formatting functions, right? i.e. something like date_time.format("%d/%m/%Y")
The idea is to be able to format timestamps / dates back to different formats of strings
Describe the solution you'd like
Implement some sort of date/time/timestamp -> string formatting function that takes a user defined formatting string (probably chrono format) and returns a string
For example the postgres to_char
function does this:
https://www.postgresql.org/docs/current/functions-formatting.html
Spark may have a better API (I haven't researched it)
arrow-rs already has the actual formatting code in ArrayFormatter
:
https://docs.rs/arrow/latest/arrow/util/display/struct.ArrayFormatter.html
And specify by
https://docs.rs/arrow/latest/arrow/util/display/struct.FormatOptions.html
So this project is likely just to define a function, wire it in, and write some tests
Describe alternatives you've considered
No response
Additional context
No response