pub trait IcebergWriter: Send + 'static {
// Required methods
fn write_chunk<'life0, 'async_trait>(
&'life0 mut self,
chunk: DataChunk,
) -> Pin<Box<dyn Future<Output = StreamExecutorResult<Vec<PositionDeleteInput>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn flush<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamExecutorResult<Option<SinkMetadata>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait abstracting the Iceberg data file writing for testability.
Implementations are responsible for writing rows to Iceberg data files and tracking row positions. Commit is handled by the executor, not the writer.
Required Methods§
Sourcefn write_chunk<'life0, 'async_trait>(
&'life0 mut self,
chunk: DataChunk,
) -> Pin<Box<dyn Future<Output = StreamExecutorResult<Vec<PositionDeleteInput>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_chunk<'life0, 'async_trait>(
&'life0 mut self,
chunk: DataChunk,
) -> Pin<Box<dyn Future<Output = StreamExecutorResult<Vec<PositionDeleteInput>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Write a batch of insert rows. Returns the position of each row in the chunk (in order).
Sourcefn flush<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamExecutorResult<Option<SinkMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StreamExecutorResult<Option<SinkMetadata>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flush current data files on barrier. Returns the written data files and each file’s partition information (if partitioned).