Package org.apache.iceberg.io
Class BaseTaskWriter.BaseEqualityDeltaWriter
java.lang.Object
org.apache.iceberg.io.BaseTaskWriter.BaseEqualityDeltaWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
BaseTaskWriter<T>
Base equality delta writer to write both insert records and equality-deletes.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema) protectedBaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema, DeleteGranularity deleteGranularity) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StructLikeasStructLike(T data) Wrap the data as aStructLike.protected abstract StructLikeasStructLikeKey(T key) Wrap the passed in key of a row as aStructLikevoidclose()voidDelete those rows whose equality fields has the same values with the given row.voidDelete those rows with the given key.void
-
Constructor Details
-
BaseEqualityDeltaWriter
-
BaseEqualityDeltaWriter
protected BaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema, DeleteGranularity deleteGranularity)
-
-
Method Details
-
asStructLike
Wrap the data as aStructLike. -
asStructLikeKey
Wrap the passed in key of a row as aStructLike -
write
- Throws:
IOException
-
delete
Delete those rows whose equality fields has the same values with the given row. It will write the entire row into the equality-delete file.- Parameters:
row- the given row to delete.- Throws:
IOException
-
deleteKey
Delete those rows with the given key. It will only write the values of equality fields into the equality-delete file.- Parameters:
key- is the projected data whose columns are the same as the equality fields.- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-