Skip to content

Commit

Permalink
[BugFix] Fix NPE when replaying of adding sub partition (#49433)
Browse files Browse the repository at this point in the history
Signed-off-by: xiangguangyxg <[email protected]>
(cherry picked from commit 8f1060e)
  • Loading branch information
xiangguangyxg authored and mergify[bot] committed Aug 6, 2024
1 parent 3ba8d2c commit 5f5161c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fe/fe-core/src/main/java/com/starrocks/catalog/Partition.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ public boolean isImmutable() {

public void addSubPartition(PhysicalPartition subPartition) {
if (subPartition instanceof PhysicalPartitionImpl) {
if (subPartition.getName() == null) {
subPartition.setName(generatePhysicalPartitionName(subPartition.getId()));
}
idToSubPartition.put(subPartition.getId(), (PhysicalPartitionImpl) subPartition);
nameToSubPartition.put(subPartition.getName(), (PhysicalPartitionImpl) subPartition);
}
Expand Down

0 comments on commit 5f5161c

Please sign in to comment.