improved hive sql parser. for issue #2051

This commit is contained in:
wenshao
2017-10-20 16:16:28 +08:00
parent bb2bbd833c
commit 9167fc7cf4
8 changed files with 242 additions and 5 deletions
@@ -27,6 +27,7 @@ import com.alibaba.druid.sql.dialect.mysql.ast.MySqlUnique;
import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlTableIndex;
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
import com.alibaba.druid.util.FnvHash;
import com.alibaba.druid.util.JdbcConstants;
import com.alibaba.druid.util.ListDG;
import com.alibaba.druid.util.lang.Consumer;
@@ -52,6 +53,7 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
protected SQLName tablespace;
protected SQLPartitionBy partitioning;
protected SQLName storedAs;
public SQLCreateTableStatement(){
@@ -978,6 +980,17 @@ public class SQLCreateTableStatement extends SQLStatementImpl implements SQLDDLS
}
}
public SQLName getStoredAs() {
return storedAs;
}
public void setStoredAs(SQLName x) {
if (x != null) {
x.setParent(this);
}
this.storedAs = x;
}
public SQLCreateTableStatement clone() {
SQLCreateTableStatement x = new SQLCreateTableStatement(dbType);
cloneTo(x);