This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
fix(c/sql): use the legacy parser as fall back #9630
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The JSQLParser we use is currently not aware of some of the proprietary
SQL syntax PostgreSQL supports and it is strict (as parsers are) as to
the correct syntax of SQL it can parse. This came up in issues like
ENTESB-16608 and ENTESB-16609, so as a strategy to help when SQL
statement parsing fails this brings the legacy parser, the parser used
before we switched to JSQLParser as a fall back. Now when a statement
can't be parsed using JSQLParser an attempt is made to parse the
statement using the legacy parser. If the legacy parser fails, the
original error is reported, i.e. the one from JSQLParser.
Ref. https://issues.redhat.com/browse/ENTESB-16608
Ref. https://issues.redhat.com/browse/ENTESB-16609