mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
support clickhouse limit by, fix #4110
This commit is contained in:
@@ -5711,6 +5711,21 @@ public class SQLExprParser extends SQLParser {
|
||||
} else {
|
||||
limit.setRowCount(temp);
|
||||
}
|
||||
|
||||
if (lexer.token == Token.BY && dbType == DbType.clickhouse) {
|
||||
lexer.nextToken();
|
||||
|
||||
for (;;) {
|
||||
SQLExpr item = this.expr();
|
||||
limit.addBy(item);
|
||||
if (lexer.token == Token.COMMA) {
|
||||
lexer.nextToken();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return limit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user