Class SortingPositionOnlyDeleteWriter<T>

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, FileWriter<PositionDelete<T>,​DeleteWriteResult>

    public class SortingPositionOnlyDeleteWriter<T>
    extends java.lang.Object
    implements FileWriter<PositionDelete<T>,​DeleteWriteResult>
    A position delete writer that is capable of handling unordered deletes without rows.

    This writer keeps an in-memory bitmap of deleted positions per each seen data file and flushes the result into a file when closed. This enables writing position delete files when the incoming records are not ordered by file and position as required by the spec. If the incoming deletes are ordered by an external process, use PositionDeleteWriter instead.

    If configured, this writer can also load previous deletes using the provided function and merge them with incoming ones prior to flushing the deletes into a file. Callers must ensure only previous file-scoped deletes are loaded because partition-scoped deletes can apply to multiple data files and can't be safely discarded.

    Note this writer stores only positions. It does not store deleted records.