mirror of https://github.com/alibaba/druid.git
Fix create view data type parser.
This commit is contained in:
parent
85a1cdf275
commit
df980a3eba
|
@ -4,6 +4,7 @@ import com.alibaba.druid.DbType;
|
|||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAlterTableStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCreateViewStatement;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUpdateSetItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLWithSubqueryClause;
|
||||
|
@ -115,4 +116,7 @@ public class CKStatementParser extends SQLStatementParser {
|
|||
}
|
||||
}
|
||||
}
|
||||
public void parseCreateViewAtDataType(SQLColumnDefinition column, SQLName expr) {
|
||||
column.setDataType(this.exprParser.parseDataType());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1740,8 +1740,6 @@ public class OdpsStatementParser extends HiveStatementParser {
|
|||
public void parseCreateViewAtDataType(SQLColumnDefinition column, SQLName expr) {
|
||||
if (expr.getSimpleName().startsWith("@")) {
|
||||
column.setDataType(this.exprParser.parseDataType());
|
||||
} else {
|
||||
super.parseCreateViewAtDataType(column, expr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4971,7 +4971,6 @@ public class SQLStatementParser extends SQLParser {
|
|||
public void parseCreateViewAfterName(SQLCreateViewStatement createView) {
|
||||
}
|
||||
public void parseCreateViewAtDataType(SQLColumnDefinition column, SQLName expr) {
|
||||
column.setDataType(this.exprParser.parseDataType());
|
||||
}
|
||||
public SQLCreateViewStatement parseCreateView() {
|
||||
SQLCreateViewStatement createView = new SQLCreateViewStatement(getDbType());
|
||||
|
|
Loading…
Reference in New Issue