HappenLee commented on code in PR #24493:
URL: https://github.com/apache/doris/pull/24493#discussion_r1328207271
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -410,12 +411,20 @@ private boolean processDropColumn(DropColumnClause
alterClause, OlapTable olapTa
Iterator<Column> iter = rollupSchema.iterator();
while (iter.hasNext()) {
Column column = iter.next();
- if (column.getName().equalsIgnoreCase(dropColName)) {
- if (column.isKey()) {
- lightSchemaChange = false;
+ boolean needDrop =
column.getName().equalsIgnoreCase(dropColName);
+ if (!needDrop && column.getDefineExpr() != null) {
+ List<SlotRef> slots = new ArrayList<>();
+ column.getDefineExpr().collect(SlotRef.class, slots);
+ for (SlotRef slot : slots) {
+ if
(slot.getColumnName().equalsIgnoreCase(dropColName)) {
+ needDrop = true;
Review Comment:
needDropMVFirst ? better name?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]