Skip to content

Commit 1edd71e

Browse files
committed
fix key and range subpartition not support
1 parent fe5e859 commit 1edd71e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/java/com/alipay/oceanbase/rpc/location/LocationUtil.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1771,8 +1771,14 @@ private static Map<Long, Long> parseKeyHashPart(ResultSet rs, TableEntry tableEn
17711771
long subPartNum = rs.getLong("sub_part_num");
17721772
subHashPartDesc.setPartNum((int) subPartNum);
17731773
}
1774+
} else if (subPartDesc instanceof ObRangePartDesc) {
1775+
ObRangePartDesc subRangePartDesc = (ObRangePartDesc) subPartDesc;
1776+
if (!isSubPart && subRangePartDesc.getPartNum() == 0) {
1777+
long subPartNum = rs.getLong("sub_part_num");
1778+
subRangePartDesc.setPartNum((int) subPartNum);
1779+
}
17741780
} else {
1775-
throw new IllegalArgumentException("sub part desc is not key or hash part desc");
1781+
throw new IllegalArgumentException("sub part desc is not key,hash and range part desc");
17761782
}
17771783
}
17781784
Long tabletId = rs.getLong("tablet_id");

0 commit comments

Comments
 (0)