[#7171] Fixed WHERE and CONNECT BY ordering
This commit is contained in:
parent
bd26ea245a
commit
166e2f1027
@ -365,8 +365,8 @@ selectField = field [ [ 'AS' ] identifier ]
|
||||
|
||||
tableExpression =
|
||||
[ 'FROM' tables ]
|
||||
[ connectBy ]
|
||||
[ 'WHERE' condition ]
|
||||
[ connectBy ]
|
||||
[ groupBy ]
|
||||
[ 'HAVING' condition ]
|
||||
[ 'WINDOW' windows ]
|
||||
|
||||
@ -1115,6 +1115,9 @@ final class ParserImpl implements Parser {
|
||||
if (from != null && from.size() == 1 && from.get(0).getName().equalsIgnoreCase("dual"))
|
||||
from = null;
|
||||
|
||||
if (parseKeywordIf(ctx, "WHERE"))
|
||||
where = parseCondition(ctx);
|
||||
|
||||
if (parseKeywordIf(ctx, "START WITH")) {
|
||||
startWith = parseCondition(ctx);
|
||||
parseKeyword(ctx, "CONNECT BY");
|
||||
@ -1129,9 +1132,6 @@ final class ParserImpl implements Parser {
|
||||
startWith = parseCondition(ctx);
|
||||
}
|
||||
|
||||
if (parseKeywordIf(ctx, "WHERE"))
|
||||
where = parseCondition(ctx);
|
||||
|
||||
if (parseKeywordIf(ctx, "GROUP BY")) {
|
||||
if (parseIf(ctx, '(')) {
|
||||
parse(ctx, ')');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user