Package org.apache.iceberg.deletes
Interface PositionDeleteIndex
public interface PositionDeleteIndex
- 
Method SummaryModifier and TypeMethodDescriptiondefault longReturns the cardinality of this index.voiddelete(long position) Set a deleted row position.voiddelete(long posStart, long posEnd) Set a range of deleted row positions.default Collection<DeleteFile> Returns delete files that this index was created from or an empty collection if unknown.static PositionDeleteIndexdeserialize(byte[] bytes, DeleteFile deleteFile) Deserializes a position delete index.static PositionDeleteIndexempty()Returns an empty immutable position delete index.default voidforEach(LongConsumer consumer) Traverses all positions in the index in ascending order, applying the provided consumer.booleanisDeleted(long position) Checks whether a row at the position is deleted.booleanisEmpty()Returns true if this collection contains no element.default booleanReturns true if this collection contains elements.default voidmerge(PositionDeleteIndex that) Adds positions from the other index, modifying this index in place.default ByteBufferSerializes this index.
- 
Method Details- 
deletevoid delete(long position) Set a deleted row position.- Parameters:
- position- the deleted row position
 
- 
deletevoid delete(long posStart, long posEnd) Set a range of deleted row positions.- Parameters:
- posStart- inclusive beginning of position range
- posEnd- exclusive ending of position range
 
- 
mergeAdds positions from the other index, modifying this index in place.- Parameters:
- that- the other index to merge
 
- 
isDeletedboolean isDeleted(long position) Checks whether a row at the position is deleted.- Parameters:
- position- deleted row position
- Returns:
- whether the position is deleted
 
- 
isEmptyboolean isEmpty()Returns true if this collection contains no element.
- 
isNotEmptydefault boolean isNotEmpty()Returns true if this collection contains elements.
- 
forEachTraverses all positions in the index in ascending order, applying the provided consumer.- Parameters:
- consumer- a consumer for the positions
 
- 
deleteFilesReturns delete files that this index was created from or an empty collection if unknown.- Returns:
- delete files that this index was created from
 
- 
cardinalitydefault long cardinality()Returns the cardinality of this index.
- 
serializeSerializes this index.- Returns:
- a buffer containing the serialized index
 
- 
deserializeDeserializes a position delete index.- Parameters:
- bytes- an array containing the serialized index
- deleteFile- the delete file that the index is created for
- Returns:
- the deserialized index
 
- 
emptyReturns an empty immutable position delete index.
 
-