Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zouxxyy committed Dec 29, 2024
1 parent 90298f2 commit 290aad6
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -908,15 +908,15 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>> fetchBaseFileAllRecords
return Collections.emptyMap();
}

ClosableIterator<HoodieRecord<?>> recordIterator = reader.getRecordIterator();

return toStream(recordIterator).map(record -> {
GenericRecord data = (GenericRecord) record.getData();
return composeRecord(data, partitionName);
}).filter(record -> {
return keySet.contains(SecondaryIndexKeyUtils.getRecordKeyFromSecondaryIndexKey(record.getRecordKey()));
}).collect(Collectors.toMap(record -> {
return SecondaryIndexKeyUtils.getRecordKeyFromSecondaryIndexKey(record.getRecordKey());
}, record -> record));
try (ClosableIterator<HoodieRecord<?>> recordIterator = reader.getRecordIterator()) {
return toStream(recordIterator).map(record -> {
GenericRecord data = (GenericRecord) record.getData();
return composeRecord(data, partitionName);
}).filter(record -> keySet.contains(SecondaryIndexKeyUtils
.getRecordKeyFromSecondaryIndexKey(record.getRecordKey())))
.collect(Collectors.toMap(record ->
SecondaryIndexKeyUtils.getRecordKeyFromSecondaryIndexKey(record.getRecordKey()),
record -> record));
}
}
}

0 comments on commit 290aad6

Please sign in to comment.