-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sqlparser: Improve interval parsing (#13165)
* sqlparser: Improve interval parsing Parse only strict valid units for intervals. We should not allow any arbitrary string value here. We already had the internal enumerable available, but we were not using yet. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> * sqlparser: Explicit parsing for date functions with intervals In order to better be able to implement these in the evalengine, it's easier to parse them explicitly in the parser. This ensures we have the interval type etc. directly available instead of having to infer it from a separate expression. Also makes parsing these functions more strict and better match MySQL. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> * sqlparser: Remove INTERVAL as general expression INTERVAL is not a possible general expression, but only used in specific cases. With the previous change, we already have it all handled for date functions. The only remaining cases are for + and - where this is handled. Those cases are a bit special. You can have an interval on both sides of a +, but for a - it can only be done on the right hand side. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> --------- Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
- Loading branch information
Showing
19 changed files
with
8,874 additions
and
8,164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.