Skip to content

Commit

Permalink
[BugFix] Fix NPE when replaying of adding sub partition (backport #49433
Browse files Browse the repository at this point in the history
) (#49441)

Co-authored-by: xiangguangyxg <[email protected]>
  • Loading branch information
mergify[bot] and xiangguangyxg authored Aug 6, 2024
1 parent 3ba8d2c commit 857dd73
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 857dd73

Please sign in to comment.