arrow

package
v0.195.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendBool

func AppendBool(b array.Builder, v bool) error

AppendBool will append a bool to a compatible builder.

func AppendFloat

func AppendFloat(b array.Builder, v float64) error

AppendFloat will append a float64 to a compatible builder.

func AppendInt

func AppendInt(b array.Builder, v int64) error

AppendInt will append an int64 to a compatible builder.

func AppendString

func AppendString(b array.Builder, v string) error

AppendString will append a string to a compatible builder.

func AppendTime

func AppendTime(b array.Builder, v values.Time) error

AppendTime will append a Time value to a compatible builder.

func AppendUint

func AppendUint(b array.Builder, v uint64) error

AppendUint will append a uint64 to a compatible builder.

func AppendValue

func AppendValue(b array.Builder, v values.Value) error

AppendValue will append a value to the builder.

Be aware when using this function that it will perform more slowly than type switching the builder to its appropriate type and appending multiple values in a row.

func BoolSlice

func BoolSlice(arr *array.Boolean, i, j int) *array.Boolean

func Empty

func Empty(typ flux.ColType) array.Array

Empty constructs an empty array for the given type.

func FloatSlice

func FloatSlice(arr *array.Float, i, j int) *array.Float

func IntSlice

func IntSlice(arr *array.Int, i, j int) *array.Int

func NewAllocator

func NewAllocator(a memory.Allocator) arrowmemory.Allocator

func NewBool

func NewBool(vs []bool, alloc memory.Allocator) *array.Boolean

func NewBoolBuilder

func NewBoolBuilder(a memory.Allocator) *array.BooleanBuilder

func NewBuilder

func NewBuilder(typ flux.ColType, mem memory.Allocator) array.Builder

NewBuilder constructs a new builder for the given column type. The allocator passed in must be non-nil.

func NewFloat

func NewFloat(vs []float64, alloc memory.Allocator) *array.Float

func NewFloatBuilder

func NewFloatBuilder(a memory.Allocator) *array.FloatBuilder

func NewInt

func NewInt(vs []int64, alloc memory.Allocator) *array.Int

func NewIntBuilder

func NewIntBuilder(a memory.Allocator) *array.IntBuilder

func NewString

func NewString(vs []string, alloc memory.Allocator) *array.String

func NewStringBuilder

func NewStringBuilder(a memory.Allocator) *array.StringBuilder

func NewUint

func NewUint(vs []uint64, alloc memory.Allocator) *array.Uint

func NewUintBuilder

func NewUintBuilder(a memory.Allocator) *array.UintBuilder

func Nulls

func Nulls(typ flux.ColType, n int, mem memory.Allocator) array.Array

Nulls creates an array of entirely nulls. It uses the ColType to determine which builder to use.

func Repeat

func Repeat(colType flux.ColType, v values.Value, n int, mem memory.Allocator) array.Array

Repeat will construct an arrow array that repeats the value n times.

func Slice

func Slice(arr array.Array, i, j int64) array.Array

Slice will construct a new slice of the array using the given start and stop index. The returned array must be released.

This is functionally equivalent to using array.NewSlice, but array.NewSlice will construct an array.String when the data type is a string rather than an array.Binary.

func StringSlice

func StringSlice(arr *array.String, i, j int) *array.String

func UintSlice

func UintSlice(arr *array.Uint, i, j int) *array.Uint

Types

type TableBuffer

type TableBuffer struct {
	GroupKey flux.GroupKey
	Columns  []flux.ColMeta
	Values   []array.Array
}

TableBuffer represents the buffered component of an arrow table.

TableBuffer is a low-level structure for creating a table that implements the flux.ColReader interface. It does not have very many guiding blocks to ensure it is used correctly.

A valid TableBuffer will have a number of columns that is equal in length to the number of values arrays. All of the values arrays will have the same length.

func EmptyBuffer

func EmptyBuffer(key flux.GroupKey, cols []flux.ColMeta) TableBuffer

EmptyBuffer properly constructs an empty TableBuffer.

func (*TableBuffer) Bools

func (t *TableBuffer) Bools(j int) *array.Boolean

func (*TableBuffer) Cols

func (t *TableBuffer) Cols() []flux.ColMeta

func (*TableBuffer) Floats

func (t *TableBuffer) Floats(j int) *array.Float

func (*TableBuffer) Ints

func (t *TableBuffer) Ints(j int) *array.Int

func (*TableBuffer) Key

func (t *TableBuffer) Key() flux.GroupKey

func (*TableBuffer) Len

func (t *TableBuffer) Len() int

func (*TableBuffer) Release

func (t *TableBuffer) Release()

func (*TableBuffer) Retain

func (t *TableBuffer) Retain()

func (*TableBuffer) Strings

func (t *TableBuffer) Strings(j int) *array.String

func (*TableBuffer) Times

func (t *TableBuffer) Times(j int) *array.Int

func (*TableBuffer) UInts

func (t *TableBuffer) UInts(j int) *array.Uint

func (*TableBuffer) Validate

func (t *TableBuffer) Validate() error

Validate will validate that this TableBuffer has the proper structure.

Jump to

Keyboard shortcuts

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