You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Precedence bug with date comparison to date plus interval #3408
I get an error with: select i_item_desc from test where d3_date > d1_date + INTERVAL '5 days' and d2_date > d1_date + INTERVAL '3 days' that's due to incorrectly parsing the and operator, so I could open a separate issue for that.
Activity
Dandandan commentedon Oct 6, 2022
Seems this is an issue in sqlparser-rs, namely in the values in for
+and>used inget_next_precedence.sarahyurick commentedon Oct 11, 2022
If no one has picked this up yet, I would be happy to work on this.
Dandandan commentedon Oct 11, 2022
I don't believe so, so go ahead. As mentioned in the comment, I believe it is a bug in
sqlparser(in precedence values).sarahyurick commentedon Oct 20, 2022
I'm not really able to reproduce the error on the DataFusion side. For example:
where the contents of
data.csvare:Produces the expected output without any errors. I'm able to get the correct results on the Dask-SQL side, too:
Is there maybe another example I should try?
sarahyurick commentedon Oct 20, 2022
I get an error with:
select i_item_desc from test where d3_date > d1_date + INTERVAL '5 days' and d2_date > d1_date + INTERVAL '3 days'that's due to incorrectly parsing theandoperator, so I could open a separate issue for that.Error: NotImplemented("Unsupported interval argument. Expected string literal, got: BinaryOp { left: Value(SingleQuotedString(\"5 days\")), op: And, right: BinaryOp { left: Identifier(Ident { value: \"d2_date\", quote_style: None }), op: Gt, right: BinaryOp { left: Identifier(Ident { value: \"d1_date\", quote_style: None }), op: Plus, right: Interval { value: Value(SingleQuotedString(\"3 days\")), leading_field: None, leading_precision: None, last_field: None, fractional_seconds_precision: None } } } }")andygrove commentedon Oct 24, 2022
Thanks @sarahyurick. Perhaps the original issue already got resolved in sqlparser. It makes sense to me to open a new issue for the issue you found.
alamb commentedon Dec 12, 2022
This is fixed -- I have a PR open to add some regression test coverage: #4569