batch

package
v4.80.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2025 License: MPL-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceRecord

func SliceRecord(r arrow.Record, limit *Cap) (add *SlicedRecord, flush []arrow.Record, remaining *SlicedRecord)

SliceRecord will return the SlicedRecord you can add to the batch given the restrictions provided (if any). The meaning of the returned values: - `add` is good to be added to the current batch that the caller is assembling - `flush` represents sliced arrow.Record that needs own batch to be flushed - `remaining` represents the overflow of the batch after `add` & `flush` are processed Note that the `limit` provided will not be updated.

Types

type Cap

type Cap struct {
	// contains filtered or unexported fields
}

func CappedAt

func CappedAt(bytes, rows int64) *Cap

func (*Cap) AddRows

func (c *Cap) AddRows(rows int64)

func (*Cap) AddSlice

func (c *Cap) AddSlice(record *SlicedRecord)

func (*Cap) ReachedLimit

func (c *Cap) ReachedLimit() bool

func (*Cap) Reset

func (c *Cap) Reset()

func (*Cap) Rows

func (c *Cap) Rows() int64

type SlicedRecord

type SlicedRecord struct {
	arrow.Record
	Bytes int64 // we need this as the util.TotalRecordSize will report the full size even for the sliced record
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL