Fix bug: CreateIndexClause can be casted to AlterTableClause (#2667)

This commit is contained in:
turbo jason
2020-01-06 18:31:40 +08:00
committed by ZHAO Chun
parent 7f148c188e
commit c6badaec91
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@ import com.google.common.collect.Maps;
import java.util.Map;
public class CreateIndexClause extends AlterClause {
public class CreateIndexClause extends AlterTableClause {
// in which table the index on, only used when alter = false
private TableName tableName;
// index definition class
@ -39,6 +39,7 @@ public class CreateIndexClause extends AlterClause {
this.tableName = tableName;
this.indexDef = indexDef;
this.alter = alter;
this.needTableStable = true;
}
@Override

View File

@ -24,7 +24,7 @@ import org.apache.commons.lang.StringUtils;
import java.util.Map;
public class DropIndexClause extends AlterClause {
public class DropIndexClause extends AlterTableClause {
private final String indexName;
private final TableName tableName;
private boolean alter;
@ -33,6 +33,7 @@ public class DropIndexClause extends AlterClause {
this.indexName = indexName;
this.tableName = tableName;
this.alter = alter;
this.needTableStable = true;
}
public String getIndexName() {