postgresql parser support distinct on, fix #4063

This commit is contained in:
高铁
2020-12-12 15:44:42 +08:00
parent 20290e845f
commit 3d77f4450d
6 changed files with 52 additions and 26 deletions
@@ -1125,6 +1125,16 @@ public class SQLExprParser extends SQLParser {
break;
}
throw new ParserException("ERROR. " + lexer.info());
case ON:
if (dbType == DbType.postgresql) {
String methodName = lexer.stringVal();
lexer.nextToken();
if (lexer.token == Token.LPAREN) {
sqlExpr = this.methodRest(new SQLIdentifierExpr(methodName), true);
break;
}
}
throw new ParserException("ERROR. " + lexer.info());
default:
throw new ParserException("ERROR. " + lexer.info());
}