Package org.apache.iceberg.io
Interface PositionDeltaWriter<T>
- Type Parameters:
- T- the row type
- All Superinterfaces:
- AutoCloseable,- Closeable
- All Known Implementing Classes:
- BasePositionDeltaWriter
A writer capable of writing data and position deletes that may belong to different specs and
 partitions.
- 
Method SummaryModifier and TypeMethodDescriptiondefault voiddelete(CharSequence path, long pos, PartitionSpec spec, StructLike partition) Deletes a position in the provided spec/partition.voiddelete(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.voidinsert(T row, PartitionSpec spec, StructLike partition) Inserts a row to the provided spec/partition.result()Returns a result that contains information about writtenDataFiles orDeleteFiles.default voidupdate(T row, PartitionSpec spec, StructLike partition) Inserts a new version of an existing row to the provided spec/partition.
- 
Method Details- 
insertInserts a row to the provided spec/partition.- Parameters:
- row- a data record
- spec- a partition spec
- partition- a partition or null if the spec is unpartitioned
 
- 
updateInserts a new version of an existing row to the provided spec/partition.This method allows writers to distinguish new and updated records. The caller must separately invoke delete(CharSequence, long, PartitionSpec, StructLike)for the original row position that is being updated.- Parameters:
- row- a new version of an existing row
- spec- a new partition spec
- partition- a new partition or null if the spec is unpartitioned
 
- 
deleteDeletes a position in the provided spec/partition.- Parameters:
- path- a data file path
- pos- a position
- spec- a partition spec
- partition- a partition or null if the spec is unpartitioned
 
- 
deleteDeletes a position in the provided spec/partition and records the deleted row in the delete file.- Parameters:
- path- a data file path
- pos- a position
- row- a deleted row
- spec- a partition spec
- partition- a partition or null if the spec is unpartitioned
 
- 
resultWriteResult result()Returns a result that contains information about writtenDataFiles orDeleteFiles. The result is valid only after the writer is closed.- Returns:
- the writer result
 
 
-