[#8682] Corrected parsing of LOG() function

The SQL parser had reversed the "base" and "value" parameters when
parsing the LOG() function.
This commit is contained in:
Knut Wannheden 2019-05-24 10:30:02 +02:00
parent 293ccc7e2c
commit 2dafae0c85

View File

@ -6066,11 +6066,11 @@ final class ParserImpl implements Parser {
private static final Field<?> parseFieldLogIf(ParserContext ctx) {
if (parseFunctionNameIf(ctx, "LOG")) {
parse(ctx, '(');
Field<?> arg1 = toField(ctx, parseNumericOp(ctx, N));
long base = parseUnsignedInteger(ctx);
parse(ctx, ',');
long arg2 = parseUnsignedInteger(ctx);
Field<?> field = toField(ctx, parseNumericOp(ctx, N));
parse(ctx, ')');
return log((Field) arg1, (int) arg2);
return log((Field) field, (int) base);
}
return null;