We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
interval '1 month'
I can add a date and an interval using the interval syntax
interval
❯ select '2012-01-01'::date + interval '1 month'; +----------------------------------------------------------------------------+ | Utf8("2012-01-01") + IntervalMonthDayNano("79228162514264337593543950336") | +----------------------------------------------------------------------------+ | 2012-02-01 | +----------------------------------------------------------------------------+
I can add a interval and date using the explicit ::interval syntax:
::interval
❯ select '1 month'::interval + '2012-01-01'::date; +--------------------------------------+ | Utf8("1 month") + Utf8("2012-01-01") | +--------------------------------------+ | 2012-02-01 | +--------------------------------------+
However, I can not add a interval and date using interval sytnax 🤯
date
❯ select interval '1 month' + '2012-01-01'::date; This feature is not implemented: Unsupported interval argument. Expected string literal, got: BinaryOp { left: Value(SingleQuotedString("1 month")), op: Plus, right: Cast { expr: Value(SingleQuotedString("2012-01-01")), data_type: Date } }
❯ select interval '1 month' + '2012-01-01'::date;
+--------------------------------------+ | Utf8("1 month") + Utf8("2012-01-01") | +--------------------------------------+ | 2012-02-01 | +--------------------------------------+
This looks like potentially a sqlparser-rs bug (or something about how datafusion handles the resulting AST)
Originally filed by @jackwener as #6180
The text was updated successfully, but these errors were encountered:
INTERVAL
interval '1 month' + date/timestamp
Successfully merging a pull request may close this issue.
Describe the bug
I can add a date and an interval using the
interval
syntaxI can add a interval and date using the explicit
::interval
syntax:However, I can not add a
interval
anddate
usinginterval
sytnax 🤯To Reproduce
Expected behavior
Additional context
This looks like potentially a sqlparser-rs bug (or something about how datafusion handles the resulting AST)
Originally filed by @jackwener as #6180
The text was updated successfully, but these errors were encountered: