-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: add support for INTERPRET function parsing #1816
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
feat: add support for INTERPRET function parsing #1816
Conversation
Update JSqlParserCC.jjt adding properly definition Added InterpretExpression java class Add visit function implementation to classes that implements ExpressionVisitor Added InterpretExpression tests BREAKING CHANGE: No
Greetings! Thank you your contribution and interest in JSQLParser. If so, would it not be better to just to extend the existing |
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.
Looks good in general, but I think it would be better merged into the existing Cast()
function since only the keyword seems to be different.
Saves a lot of code for the Visitors and keeps the Grammar slim.
src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java
Outdated
Show resolved
Hide resolved
src/main/java/net/sf/jsqlparser/util/validation/validator/ExpressionValidator.java
Outdated
Show resolved
Hide resolved
Thanks for the review. Yes you are right, the behavior is similar to the CAST. It is database specific and was introduced in recent versions of the IBM i-series to replace the use of cast to parse journal content. I will modify the PR by joining the code to the CAST function. Thank you |
Remove unused code Replace stat import with class-specific import
Thanks! Looks good now and I would merge it when the QA tests will have ran through. |
Thank you again for your contribution, merged. |
Fantastic. Thank you for this very useful library |
Update JSqlParserCC.jjt adding properly definition Added InterpretExpression java class
Add visit function implementation to classes that implements ExpressionVisitor Added InterpretExpression tests
BREAKING CHANGE: No