Package org.apache.iceberg.io
Interface EqualityDeltaWriter<T>
- Type Parameters:
T
- the row type
- All Superinterfaces:
AutoCloseable
,Closeable
A writer capable of writing data and equality deletes that may belong to different specs and
partitions.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(T row, PartitionSpec spec, StructLike partition) Deletes a row from the provided spec/partition.void
deleteKey
(T key, PartitionSpec spec, StructLike partition) Deletes a key from the provided spec/partition.void
insert
(T row, PartitionSpec spec, StructLike partition) Inserts a row to the provided spec/partition.result()
Returns a result that contains information about writtenDataFile
s orDeleteFile
s.
-
Method Details
-
insert
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
Deletes a row from the provided spec/partition.This method assumes the delete record has the same schema as the rows that will be inserted.
- Parameters:
row
- a delete recordspec
- a partition specpartition
- a partition or null if the spec is unpartitioned
-
deleteKey
Deletes a key from the provided spec/partition.This method assumes the delete key contains values only for equality fields.
- Parameters:
key
- a delete keyspec
- 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
-