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.Closeable
Base equality delta writer to write both insert records and equality-deletes.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseEqualityDeltaWriter(StructLike partition, Schema schema, Schema deleteSchema)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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(T row)
Delete those rows whose equality fields has the same values with the given row.void
deleteKey(T key)
Delete those rows with the given key.void
write(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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-