improved sql parser.

This commit is contained in:
wenshao
2017-05-28 17:39:53 +08:00
parent 78488b0b1a
commit a29eb6e0d2
45 changed files with 2303 additions and 89 deletions
@@ -1904,8 +1904,11 @@ public class SQLExprParser extends SQLParser {
SQLColumnDefinition column = createColumnDefinition();
column.setName(name());
if (lexer.token() != Token.SET //
&& lexer.token() != Token.DROP) {
final Token token = lexer.token();
if (token != Token.SET //
&& token != Token.DROP
&& token != Token.PRIMARY
&& token != Token.RPAREN) {
column.setDataType(parseDataType());
}
return parseColumnRest(column);