-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Could not parse complex COALESCE/CAST #1607
Comments
Greetings. I think its this one: There is a 6 month old PR regarding a proper keyword handling. But it has not gotten much interested yet. |
Ah (sorry for the editting) |
What I can do: I can update the PR to reflect the latest release and then you can give it a try. |
That would be nice :) |
Tomorrow first thing in the morning, I am running late here. cheers. |
No hurry! :) |
Btw: it is not a keyword according to the docs, but rather a function: |
So, maybe instead of building support, we need to remove the |
I removed it and the parse rules involving it, and now it parses fine :) |
Mmm. It fails the |
Btw: the sql2003standard does have a special case for these datetime functions: (but not the syntax db2 apparently uses, so that should perhapse be a capability setting?)
|
I think it would be rather straight-forward to implement these rules, and allow the tokens to be both with underscore, and without. |
My PR fixes this re-occurring problem in a generic way and for ALL tokens, not only this one. |
With and without underscore is supported already. |
Ah ok, I will be patient and wait for you PR :) |
The PR #1382 is there already, I just need to resolve conflicts. You can read through the lengthy discussion already for understanding what it does and how it works. |
Still relevant with JSQLParser 4.6 Snapshot. |
allows CURRENT_DATE(3) and CURRENT_TIMESTAMP(3) as regular functions fixes JSQLParser#1507 fixes JSQLParser#1607
Cool, thanks! |
This bit of (Postgresql valid) SQL fails:
net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 8, column 13.
The text was updated successfully, but these errors were encountered: