Skip to content

Commit

Permalink
[Hotfix]Fix array index anomalies caused by apache#5057 (apache#5195)
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterChenzhuo authored and liunaijie committed Aug 12, 2023
1 parent 5d8eff0 commit 7009db2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ public boolean isDataChangeRecord(SourceRecord record) {
public boolean isRecordBetween(
SourceRecord record, @Nonnull Object[] splitStart, @Nonnull Object[] splitEnd) {
BsonDocument documentKey = getDocumentKey(record);
BsonDocument splitKeys = (BsonDocument) ((Object[]) splitStart[0])[0];
BsonDocument splitKeys = (BsonDocument) splitStart[0];
String firstKey = splitKeys.getFirstKey();
BsonValue keyValue = documentKey.get(firstKey);
BsonValue lowerBound = ((BsonDocument) ((Object[]) splitEnd[0])[1]).get(firstKey);
BsonValue upperBound = ((BsonDocument) ((Object[]) splitEnd[0])[1]).get(firstKey);
BsonValue lowerBound = ((BsonDocument) splitStart[1]).get(firstKey);
BsonValue upperBound = ((BsonDocument) splitEnd[1]).get(firstKey);

if (isFullRange(lowerBound, upperBound)) {
return true;
Expand Down

0 comments on commit 7009db2

Please sign in to comment.