Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrowRowBuilder ¶
type ArrowRowBuilder struct {
// contains filtered or unexported fields
}
func NewArrowRowBuilder ¶
func NewArrowRowBuilder(aw *ArrowWriter, chunkSize int) (*ArrowRowBuilder, error)
NewArrowRowBuilder creates a new ArrowRowBuilder. The ArrowRowBuilder will write to the underlying ArrowWriter. ArrowRowBuilder is not threadsafe: it should only be used by one thread at a time, though multiple ArrowRowBuilders writing to a single ArrowWriter concurrently is possible This is done to enable fast, parallel accumulation of rows, delaying synchronization until enough rows are accumulated to write a chunk.
func (*ArrowRowBuilder) Release ¶
func (arb *ArrowRowBuilder) Release() error
Release releases the ArrowRowBuilder. This must be called to ensure that all data is successfully written to the file. Release will write any remaining rows to the file, and so must be called before Close() on the underlying ArrowWriter.
func (*ArrowRowBuilder) WriteRow ¶
func (arb *ArrowRowBuilder) WriteRow(row []any) error
WriteRow writes a row to the ArrowRowBuilder. The number of fields in the row must match the number of fields in the schema.
type ArrowWriter ¶
func NewArrowIPCFileWriter ¶
func NewArrowIPCFileWriter(f *os.File, fieldNames []string, fieldTypes []arrow.DataType, nullable bool, options ...ipc.Option) (*ArrowWriter, error)
Create a new ArrowWriter. The number of fields in fieldNames and fieldTypes must match. The number of rows in each chunk is determined by chunkSize. The ArrowWriter will write to filePath. This writing operation is threadsafe.
func (*ArrowWriter) Close ¶
func (aw *ArrowWriter) Close() error
Close closes the ArrowWriter. This must be called to ensure that all data is successfully written to the file.
func (*ArrowWriter) WriteChunk ¶
func (aw *ArrowWriter) WriteChunk(record arrow.Record) error