Interface DeltaWriter<T>
- All Superinterfaces:
AutoCloseable
,Closeable
,DataWriter<T>
A data writer returned by
DeltaWriterFactory.createWriter(int, long)
and is
responsible for writing a delta of rows.- Since:
- 3.4.0
-
Method Summary
Methods inherited from interface org.apache.spark.sql.connector.write.DataWriter
abort, commit, currentMetricsValues
-
Method Details
-
delete
Deletes a row.- Parameters:
metadata
- values for metadata columns that were projected but are not part of the row IDid
- a row ID to delete- Throws:
IOException
- if failure happens during disk/network IO like writing files
-
update
Updates a row.- Parameters:
metadata
- values for metadata columns that were projected but are not part of the row IDid
- a row ID to updaterow
- a row with updated values- Throws:
IOException
- if failure happens during disk/network IO like writing files
-
insert
Inserts a new row.- Parameters:
row
- a row to insert- Throws:
IOException
- if failure happens during disk/network IO like writing files
-
write
Description copied from interface:DataWriter
Writes one record.If this method fails (by throwing an exception),
DataWriter.abort()
will be called and this data writer is considered to have been failed.- Specified by:
write
in interfaceDataWriter<T>
- Throws:
IOException
- if failure happens during disk/network IO like writing files.
-