You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/10/07 03:56:38 UTC
[GitHub] [incubator-doris] HappenLee commented on a change in pull request #4699: Support Alter Table Clause For External Table
HappenLee commented on a change in pull request #4699:
URL: https://github.com/apache/incubator-doris/pull/4699#discussion_r500723118
##########
File path: fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java
##########
@@ -132,6 +132,30 @@ private void processAddColumn(AddColumnClause alterClause, OlapTable olapTable,
indexSchemaMap, newColNameSet);
}
+ private void processAddColumn(AddColumnClause alterClause, Table externalTable) throws DdlException {
+ Column column = alterClause.getColumn();
+ ColumnPosition columnPos = alterClause.getColPos();
+ Set<String> newColNameSet = Sets.newHashSet(column.getName());
+
+ List<Column> modIndexSchema = externalTable.getBaseSchema();
+ addColumnInternal(externalTable, column, columnPos, modIndexSchema, newColNameSet);
+ externalTable.setNewFullSchema(modIndexSchema);
Review comment:
yes, it is a problem。I will set the new schema at the end of alter external table.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org