Extract out date time parsing to a DateTimeParser trait#19755
Extract out date time parsing to a DateTimeParser trait#19755Omega359 wants to merge 39 commits into
Conversation
… jiff implementations. Overall jiff seems slightly faster in the case where parsing has no errors but slower when using multiple formats (higher cost for Error handling).
|
Thanks for the feedback @martin-g. I'm not quite done with this PR but I'll be sure to incorporate your fixes/suggestions before I set it as ready for review |
… any error back up the call chain.
# Conflicts: # datafusion/sqllogictest/Cargo.toml
# Conflicts: # datafusion/sqllogictest/Cargo.toml
# Conflicts: # datafusion/sqllogictest/Cargo.toml
# Conflicts: # datafusion/sqllogictest/Cargo.toml
|
@martin-g Thank you for the detailed feedback. I've implemented almost all of your suggestions |
|
fyi @andygrove this may be of interest for spark to_date, to_timestamp, etc functions if someone was to create a Java datetimeparser impl that had a compatible license. |
# Conflicts: # datafusion/functions/src/datetime/to_date.rs
…roto # Conflicts: # Cargo.lock # datafusion/common/src/config.rs # datafusion/common/src/parsers.rs # datafusion/functions/Cargo.toml
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
|
No review in 4 months, this feature is not desired. closing. |
|
That's too bad 😅 I had been keeping half an eye hoping for a version of this to be merged. Even ignoring speed, jiff is now recommended by the maintainer of chrono (which was recently deprecated). |
|
I had to hunt for the soft deprecation notice - it's @ chronotope/chrono#1768 for anyone who wants to read more on it. |
Which issue does this PR close?
Rationale for this change
Allowing pluggable datatime string parsing. Extracted existing Chrono implementation, added Jiff implementation. Overall Jiff is faster in the case where parsing has no errors but slower when using multiple formats (higher cost for Error handling).
What changes are included in this PR?
Code, tests, benchmark.
Are these changes tested?
Yes.
Are there any user-facing changes?
By default, no.