iceberg-cpp
Loading...
Searching...
No Matches
Public Member Functions | List of all members
iceberg::Writer Class Referenceabstract

Base writer class to write data from different file formats. More...

#include <file_writer.h>

Inheritance diagram for iceberg::Writer:
iceberg::avro::AvroWriter iceberg::parquet::ParquetWriter

Public Member Functions

 Writer (const Writer &)=delete
 
Writeroperator= (const Writer &)=delete
 
virtual Status Open (const WriterOptions &options)=0
 Open the writer.
 
virtual Status Close ()=0
 Close the writer.
 
virtual Status Write (ArrowArray *data)=0
 Write arrow data to the file.
 
virtual Result< Metricsmetrics ()=0
 Get the file statistics. Only valid after the file is closed.
 
virtual Result< int64_t > length ()=0
 Get the file length. This can be called while the writer is still open or after the file is closed.
 
virtual std::vector< int64_t > split_offsets ()=0
 Returns a list of recommended split locations, if applicable, empty otherwise. When available, this information is used for planning scan tasks whose boundaries are determined by these offsets. The returned list must be sorted in ascending order. Only valid after the file is closed.
 

Detailed Description

Base writer class to write data from different file formats.

Member Function Documentation

◆ Close()

virtual Status iceberg::Writer::Close ( )
pure virtual

Close the writer.

Implemented in iceberg::avro::AvroWriter, and iceberg::parquet::ParquetWriter.

◆ length()

virtual Result< int64_t > iceberg::Writer::length ( )
pure virtual

Get the file length. This can be called while the writer is still open or after the file is closed.

Implemented in iceberg::avro::AvroWriter, and iceberg::parquet::ParquetWriter.

◆ metrics()

virtual Result< Metrics > iceberg::Writer::metrics ( )
pure virtual

Get the file statistics. Only valid after the file is closed.

Implemented in iceberg::avro::AvroWriter, and iceberg::parquet::ParquetWriter.

◆ Open()

virtual Status iceberg::Writer::Open ( const WriterOptions options)
pure virtual

Open the writer.

Implemented in iceberg::avro::AvroWriter, and iceberg::parquet::ParquetWriter.

◆ split_offsets()

virtual std::vector< int64_t > iceberg::Writer::split_offsets ( )
pure virtual

Returns a list of recommended split locations, if applicable, empty otherwise. When available, this information is used for planning scan tasks whose boundaries are determined by these offsets. The returned list must be sorted in ascending order. Only valid after the file is closed.

Implemented in iceberg::avro::AvroWriter, and iceberg::parquet::ParquetWriter.

◆ Write()

virtual Status iceberg::Writer::Write ( ArrowArray data)
pure virtual

Write arrow data to the file.

Returns
Status of write results.
Note
Ownership of the data is transferred to the writer.

Implemented in iceberg::parquet::ParquetWriter, and iceberg::avro::AvroWriter.


The documentation for this class was generated from the following file: