vamshikrishnakyatham commented on code in PR #13852:
URL: https://github.com/apache/hudi/pull/13852#discussion_r2329361194
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v1/TimelineArchiverV1.java:
##########
@@ -442,9 +443,14 @@ private void writeToFile(Schema wrapperSchema,
List<IndexedRecord> records) thro
Map<HeaderMetadataType, String> header = new HashMap<>();
header.put(HoodieLogBlock.HeaderMetadataType.SCHEMA,
wrapperSchema.toString());
final String keyField =
table.getMetaClient().getTableConfig().getRecordKeyFieldProp();
- List<HoodieRecord> indexRecords =
records.stream().map(HoodieAvroIndexedRecord::new).collect(Collectors.toList());
- HoodieAvroDataBlock block = new HoodieAvroDataBlock(indexRecords,
header, keyField);
- writer.appendBlock(block);
+ List<HoodieRecord> indexRecords = records.stream()
+ .filter(Objects::nonNull)
Review Comment:
It does returns a record but with null data sometimes -> happens because of
race condition which hits the case of Stream.empty()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]