[#7171] Fixed WHERE and CONNECT BY ordering

This commit is contained in:
lukaseder 2018-05-16 11:53:02 +02:00
parent bd26ea245a
commit 166e2f1027
2 changed files with 4 additions and 4 deletions

View File

@ -365,8 +365,8 @@ selectField = field [ [ 'AS' ] identifier ]
tableExpression =
[ 'FROM' tables ]
[ connectBy ]
[ 'WHERE' condition ]
[ connectBy ]
[ groupBy ]
[ 'HAVING' condition ]
[ 'WINDOW' windows ]

View File

@ -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, ')');