Package org.apache.iceberg.deletes
Class Deletes
java.lang.Object
org.apache.iceberg.deletes.Deletes
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T extends StructLike>
 CloseableIterable<Long> deletePositions(CharSequence dataLocation, List<CloseableIterable<T>> deleteFiles) static CloseableIterable<Long> deletePositions(CharSequence dataLocation, CloseableIterable<StructLike> deleteFile) static <T> CloseableIterable<T> filter(CloseableIterable<T> rows, Function<T, StructLike> rowToDeleteKey, StructLikeSet deleteSet) static <T> CloseableIterable<T> filterDeleted(CloseableIterable<T> rows, Predicate<T> isDeleted, DeleteCounter counter) Returns the remaining rows (the ones that are not deleted), while counting the deleted ones.static <T> CloseableIterable<T> markDeleted(CloseableIterable<T> rows, Predicate<T> isDeleted, Consumer<T> deleteMarker) Returns the same rows that are input, while marking the deleted ones.static StructLikeSettoEqualitySet(CloseableIterable<StructLike> eqDeletes, Types.StructType eqType) static <T extends StructLike>
 PositionDeleteIndextoPositionIndex(CharSequence dataLocation, CloseableIterable<T> posDeletes, DeleteFile file) static PositionDeleteIndextoPositionIndex(CloseableIterable<Long> posDeletes) static <T extends StructLike>
 CharSequenceMap<PositionDeleteIndex> toPositionIndexes(CloseableIterable<T> posDeletes) static <T extends StructLike>
 CharSequenceMap<PositionDeleteIndex> toPositionIndexes(CloseableIterable<T> posDeletes, DeleteFile file) Builds a map of position delete indexes by path.
- 
Method Details- 
filterpublic static <T> CloseableIterable<T> filter(CloseableIterable<T> rows, Function<T, StructLike> rowToDeleteKey, StructLikeSet deleteSet) 
- 
markDeletedpublic static <T> CloseableIterable<T> markDeleted(CloseableIterable<T> rows, Predicate<T> isDeleted, Consumer<T> deleteMarker) Returns the same rows that are input, while marking the deleted ones.- Parameters:
- rows- the rows to process
- isDeleted- a predicate that determines if a row is deleted
- deleteMarker- a function that marks a row as deleted
- Returns:
- the processed rows
 
- 
filterDeletedpublic static <T> CloseableIterable<T> filterDeleted(CloseableIterable<T> rows, Predicate<T> isDeleted, DeleteCounter counter) Returns the remaining rows (the ones that are not deleted), while counting the deleted ones.- Parameters:
- rows- the rows to process
- isDeleted- a predicate that determines if a row is deleted
- counter- a counter that counts deleted rows
- Returns:
- the processed rows
 
- 
toEqualitySetpublic static StructLikeSet toEqualitySet(CloseableIterable<StructLike> eqDeletes, Types.StructType eqType) 
- 
toPositionIndexespublic static <T extends StructLike> CharSequenceMap<PositionDeleteIndex> toPositionIndexes(CloseableIterable<T> posDeletes) 
- 
toPositionIndexespublic static <T extends StructLike> CharSequenceMap<PositionDeleteIndex> toPositionIndexes(CloseableIterable<T> posDeletes, DeleteFile file) Builds a map of position delete indexes by path.This method builds a position delete index for each referenced data file and does not filter deletes. This can be useful when the entire delete file content is needed (e.g. caching). - Parameters:
- posDeletes- position deletes
- file- the source delete file for the deletes
- Returns:
- the map of position delete indexes by path
 
- 
toPositionIndexpublic static <T extends StructLike> PositionDeleteIndex toPositionIndex(CharSequence dataLocation, CloseableIterable<T> posDeletes, DeleteFile file) 
- 
toPositionIndex
- 
deletePositionspublic static CloseableIterable<Long> deletePositions(CharSequence dataLocation, CloseableIterable<StructLike> deleteFile) 
- 
deletePositionspublic static <T extends StructLike> CloseableIterable<Long> deletePositions(CharSequence dataLocation, List<CloseableIterable<T>> deleteFiles) 
 
-