[Bug] Fix enable feature error (#4558)

Fix enable feature may failed, because of base index pass to alter table.
This commit is contained in:
Zhengguo Yang
2020-09-10 09:55:19 +08:00
committed by GitHub
parent d29bf30f74
commit 97dee1f7cf

View File

@ -87,7 +87,7 @@ public class AlterTableStmt extends DdlStmt {
// has rollup table
if (table.getVisibleIndex().size() > 1) {
for (MaterializedIndex idx : table.getVisibleIndex()) {
// add a column to rollup index it will add to base table automaticlly,
// add a column to rollup index it will add to base table automatically,
// if add a column here it will duplicated
if (idx.getId() == table.getBaseIndexId()) {
continue;
@ -100,7 +100,7 @@ public class AlterTableStmt extends DdlStmt {
} else {
// no rollup tables
AddColumnClause addColumnClause = new AddColumnClause(ColumnDef.newDeleteSignColumnDef(), null,
table.getIndexNameById(table.getBaseIndexId()), null);
null, null);
addColumnClause.analyze(analyzer);
clauses.add(addColumnClause);
}