-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix interval units parsing #12448
fix interval units parsing #12448
Conversation
# This is interpreted as "0 hours" with PostgreSQL, should be fixed with | ||
query error DataFusion error: Arrow error: Parser error: Invalid input syntax for type interval: "5 day HOUR" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alamb if this passes I believe it's ready to merge despite the very minor regression, overall it's way better than what went before. In particular expressions like
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @samuelcolvin -- this looks like a great improvement to me. 🙏
Thanks again @samuelcolvin |
Which issue does this PR close?
Fixes #11271 (accidentally got closed by the companion PR apache/arrow-rs#6211).
Negative PR (at least by lines of Rust) 🎉 .
Rationale for this change
Use the much improved unit parsing logic now supported by arrow-rs, instead of a simple 'add "seconds"' hack
What changes are included in this PR?
Change interval expression parsing to use arrow-rs logic
Are these changes tested?
Yes
Are there any user-facing changes?
Improvements to
interval
expression functionality.