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 @@ -29,6 +29,7 @@
import org.apache.doris.datasource.hive.HMSExternalCatalog;
import org.apache.doris.datasource.hive.HMSExternalTable;
import org.apache.doris.datasource.hive.HiveMetaStoreCache;
import org.apache.doris.datasource.iceberg.IcebergExternalTable;
import org.apache.doris.persist.OperationType;

import com.google.common.base.Strings;
Expand Down Expand Up @@ -232,6 +233,11 @@ public void refreshExternalTableFromEvent(String catalogName, String dbName, Str

public void refreshTableInternal(ExternalDatabase db, ExternalTable table, long updateTime) {
table.unsetObjectCreated();
// Iceberg partition evolution can change partition specs across FEs.
// Clear related-table validation cache to avoid stale partitioned/unpartitioned judgment.
if (table instanceof IcebergExternalTable) {
((IcebergExternalTable) table).setIsValidRelatedTableCached(false);
}
if (updateTime > 0) {
table.setUpdateTime(updateTime);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,6 @@ public void addPartitionField(ExternalTable dorisTable, AddPartitionFieldOp op,
+ ", error message is: " + ExceptionUtils.getRootCauseMessage(e), e);
}
refreshTable(dorisTable, updateTime);
// Reset cached isValidRelatedTable flag after partition evolution
((IcebergExternalTable) dorisTable).setIsValidRelatedTableCached(false);
}

/**
Expand Down Expand Up @@ -888,8 +886,6 @@ public void dropPartitionField(ExternalTable dorisTable, DropPartitionFieldOp op
+ ", error message is: " + ExceptionUtils.getRootCauseMessage(e), e);
}
refreshTable(dorisTable, updateTime);
// Reset cached isValidRelatedTable flag after partition evolution
((IcebergExternalTable) dorisTable).setIsValidRelatedTableCached(false);
}

/**
Expand Down Expand Up @@ -931,8 +927,6 @@ public void replacePartitionField(ExternalTable dorisTable, ReplacePartitionFiel
+ ", error message is: " + ExceptionUtils.getRootCauseMessage(e), e);
}
refreshTable(dorisTable, updateTime);
// Reset cached isValidRelatedTable flag after partition evolution
((IcebergExternalTable) dorisTable).setIsValidRelatedTableCached(false);
}

@Override
Expand Down Expand Up @@ -1053,4 +1047,3 @@ private org.apache.iceberg.SortOrder buildSortOrder(List<SortFieldInfo> sortFiel
}
}


Loading