Package org.apache.iceberg.io
Class BaseTaskWriter.BaseEqualityDeltaWriter
- java.lang.Object
-
- org.apache.iceberg.io.BaseTaskWriter.BaseEqualityDeltaWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- BaseTaskWriter<T>
protected abstract class BaseTaskWriter.BaseEqualityDeltaWriter extends java.lang.Object implements java.io.CloseableBase equality delta writer to write both insert records and equality-deletes.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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(T row)Delete those rows whose equality fields has the same values with the given row.voiddeleteKey(T key)Delete those rows with the given key.voidwrite(T row)
-
-
-
Constructor Detail
-
BaseEqualityDeltaWriter
protected BaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema)
-
-
Method Detail
-
asStructLike
protected abstract StructLike asStructLike(T data)
Wrap the data as aStructLike.
-
asStructLikeKey
protected abstract StructLike asStructLikeKey(T key)
Wrap the passed in key of a row as aStructLike
-
write
public void write(T row) throws java.io.IOException
- Throws:
java.io.IOException
-
delete
public void delete(T row) throws java.io.IOException
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:
java.io.IOException
-
deleteKey
public void deleteKey(T key) throws java.io.IOException
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:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-