Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,8 @@ public void convertHashDistributionToRandomDistribution() {
distributionInfo = ((HashDistributionInfo) distributionInfo).toRandomDistributionInfo();
}
}

public boolean isRollupIndex(long id) {
return idToVisibleRollupIndex.containsKey(id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,17 @@ public void dispatch() throws Exception {
() -> Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER)));
for (Predicate condition : deleteConditions) {
SlotRef slotRef = (SlotRef) condition.getChild(0);
String columnName = new String(slotRef.getColumnName());
String columnName = slotRef.getColumnName();
TColumn column = colNameToColDesc.get(slotRef.getColumnName());
if (column == null) {
columnName = CreateMaterializedViewStmt.mvColumnBuilder(columnName);
column = colNameToColDesc.get(columnName);
}
if (column == null) {
if (partition.isRollupIndex(index.getId())) {
throw new AnalysisException("If MV or rollup index exists, do not support delete."
+ "Drop existing rollup or MV and try again.");
}
throw new AnalysisException(
"condition's column not founded in index, column=" + columnName + " , index=" + index);
}
Expand Down