AI disclosure: this issue was prepared with AI coding agents, reviewed and revised line by line by me.
Failing SQL Feature:
SQL Example:
SELECT * FROM table1 t1, table2 t2 WHERE t1.col1 LIKE t2.col2(+)
net.sf.jsqlparser.parser.ParseException: Encountered: <OPENING_BRACKET> / "("
The same failure occurs for NOT LIKE t2.col2(+), SIMILAR TO t2.col2(+), and when an ESCAPE clause follows (LIKE t2.col2(+) ESCAPE '\').
Attaching (+) to the left operand (t1.col1(+) LIKE t2.col2) already parses fine, only the right operand is missing.
Software Information:
- JSqlParser version: 5.4-SNAPSHOT (master
7cc86386)
- Database: Oracle
Tips:
AI disclosure: this issue was prepared with AI coding agents, reviewed and revised line by line by me.
Failing SQL Feature:
(+)cannot be attached to the right-hand operand of aLIKEcondition. The same holds forNOT LIKEandSIMILAR TO.(+)already works on=,<, and other comparison operators, and onBETWEENoperands since fix(parser): parse Oracle outer join operator (+) on BETWEEN operands (#672) #2564 (issue parse error between with oracle outer join(+) #672). The consumption points inCondition,RegularConditionRHSandBetweendo not cover the right operand ofLikeExpression/SimilarToExpression.SQL Example:
The same failure occurs for
NOT LIKE t2.col2(+),SIMILAR TO t2.col2(+), and when anESCAPEclause follows (LIKE t2.col2(+) ESCAPE '\').Attaching
(+)to the left operand (t1.col1(+) LIKE t2.col2) already parses fine, only the right operand is missing.Software Information:
7cc86386)Tips:
(+)on a column of aLIKEpredicate: the documented restrictions for the(+)operator name theORlogical operator, theINcomparison condition, subqueries, self-joins and non-column expressions, but notLIKE(see the rules and restrictions list in https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/Joins.html). Typical usage is a filter on the outer-joined table such asdept.dname(+) LIKE 'SALES%', or a column-to-column pattern such as the example above.LOOKAHEAD("(" "+" ")")consumption block afterrightExpression = SimpleExpression()inLikeExpressionandSimilarToExpression, marking the column viasetOldOracleJoinSyntax, would mirror theBetweenfix.