Package org.apache.iceberg.io
Interface PositionDeltaWriter<T>
-
- Type Parameters:
T
- the row type
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
- All Known Implementing Classes:
BasePositionDeltaWriter
public interface PositionDeltaWriter<T> extends java.io.Closeable
A writer capable of writing data and position deletes that may belong to different specs and partitions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
delete(java.lang.CharSequence path, long pos, PartitionSpec spec, StructLike partition)
Deletes a position in the provided spec/partition.void
delete(java.lang.CharSequence path, long pos, T row, PartitionSpec spec, StructLike partition)
Deletes a position in the provided spec/partition and records the deleted row in the delete file.void
insert(T row, PartitionSpec spec, StructLike partition)
Inserts a row to the provided spec/partition.WriteResult
result()
Returns a result that contains information about writtenDataFile
s orDeleteFile
s.
-
-
-
Method Detail
-
insert
void insert(T row, PartitionSpec spec, StructLike partition)
Inserts a row to the provided spec/partition.- Parameters:
row
- a data recordspec
- a partition specpartition
- a partition or null if the spec is unpartitioned
-
delete
default void delete(java.lang.CharSequence path, long pos, PartitionSpec spec, StructLike partition)
Deletes a position in the provided spec/partition.- Parameters:
path
- a data file pathpos
- a positionspec
- a partition specpartition
- a partition or null if the spec is unpartitioned
-
delete
void delete(java.lang.CharSequence path, long pos, T row, PartitionSpec spec, StructLike partition)
Deletes a position in the provided spec/partition and records the deleted row in the delete file.- Parameters:
path
- a data file pathpos
- a positionrow
- a deleted rowspec
- a partition specpartition
- a partition or null if the spec is unpartitioned
-
result
WriteResult result()
Returns a result that contains information about writtenDataFile
s orDeleteFile
s. The result is valid only after the writer is closed.- Returns:
- the writer result
-
-