Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzelin committed Apr 2, 2024
1 parent 352de15 commit e839416
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public RecordIterator<KeyValue> readBatch() throws IOException {
internalRow == null
? null
: serializer.fromRow(internalRow).setLevel(level));
// In older version, the delete records might be written into data file even when
// In 0.7- versions, the delete records might be written into data file even when
// ignore-delete configured, so the reader should also filter the delete records
return ignoreDelete ? transformed.filter(KeyValue::isAdd) : transformed;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public class KeyValueFileReaderFactory {
private final Map<FormatKey, BulkFormatMapping> bulkFormatMappings;
private final BinaryRow partition;
private final DeletionVector.Factory dvFactory;
private final boolean ignoreDelete;

private KeyValueFileReaderFactory(
FileIO fileIO,
Expand All @@ -91,6 +92,7 @@ private KeyValueFileReaderFactory(
this.partition = partition;
this.bulkFormatMappings = new HashMap<>();
this.dvFactory = dvFactory;
this.ignoreDelete = CoreOptions.fromMap(schema.options()).ignoreDelete();
}

public RecordReader<KeyValue> createRecordReader(
Expand Down Expand Up @@ -145,11 +147,7 @@ private RecordReader<KeyValue> createRecordReader(
}

return new KeyValueDataFileRecordReader(
fileRecordReader,
keyType,
valueType,
level,
CoreOptions.fromMap(schema.options()).ignoreDelete());
fileRecordReader, keyType, valueType, level, ignoreDelete);
}

public static Builder builder(
Expand Down

0 comments on commit e839416

Please sign in to comment.