[#5955] Fixed ORDER SIBLINGS BY

This commit is contained in:
lukaseder 2017-03-08 21:20:37 +01:00
parent 8bf8ad7fcf
commit 031ee1d018

View File

@ -495,8 +495,15 @@ class ParserImpl implements Parser {
}
}
if (parseKeywordIf(ctx, "ORDER BY"))
result.addOrderBy(parseSortSpecification(ctx));
if (parseKeywordIf(ctx, "ORDER"))
if (parseKeywordIf(ctx, "SIBLINGS BY")) {
result.addOrderBy(parseSortSpecification(ctx));
result.setOrderBySiblings(true);
}
else if (parseKeywordIf(ctx, "BY"))
result.addOrderBy(parseSortSpecification(ctx));
else
throw ctx.unexpectedToken();
if (!result.getLimit().isApplicable()) {
boolean offsetStandard = false;