}
throw new IllegalStateException(); // impossible
}
private MutationState buildIndex(PTable index, TableRef dataTableRef) throws SQLException {
PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(connection, dataTableRef);
MutationPlan plan = compiler.compile(index);
MutationState state = connection.getQueryServices().updateData(plan);
AlterIndexStatement indexStatement = FACTORY.alterIndex(FACTORY.namedTable(null,
TableName.create(index.getSchemaName().getString(), index.getTableName().getString())),
dataTableRef.getTable().getTableName().getString(), false, PIndexState.ACTIVE);
alterIndex(indexStatement);