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
ModifierConstructorDescriptionprotected
BaseEqualityDeltaWriter
(StructLike partition, Schema schema, Schema deleteSchema) protected
BaseEqualityDeltaWriter
(StructLike partition, Schema schema, Schema deleteSchema, DeleteGranularity deleteGranularity) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StructLike
asStructLike
(T data) Wrap the data as aStructLike
.protected abstract StructLike
asStructLikeKey
(T key) Wrap the passed in key of a row as aStructLike
void
close()
void
Delete those rows whose equality fields has the same values with the given row.void
Delete 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-