array

package
Version: v11.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 26 Imported by: 3

Documentation

Overview

Package array provides implementations of various Arrow array types.

Index

Examples

Constants

View Source
const (
	// UnknownNullCount specifies the NullN should be calculated from the null bitmap buffer.
	UnknownNullCount = -1
)

Variables

This section is empty.

Functions

func ApproxEqual

func ApproxEqual(left, right arrow.Array, opts ...EqualOption) bool

ApproxEqual reports whether the two provided arrays are approximately equal. For non-floating point arrays, it is equivalent to ArrayEqual.

func ArrayApproxEqual deprecated

func ArrayApproxEqual(left, right arrow.Array, opts ...EqualOption) bool

ArrayApproxEqual reports whether the two provided arrays are approximately equal. For non-floating point arrays, it is equivalent to ArrayEqual.

Deprecated: renamed to just ApproxEqual, this alias will be removed in v9. Please update calling code to just call array.ApproxEqual

func ArrayEqual deprecated

func ArrayEqual(left, right arrow.Array) bool

ArrayEqual reports whether the two provided arrays are equal.

Deprecated: This currently just delegates to calling Equal. This will be removed in v9 so please update any calling code to just call array.Equal directly instead.

func ArraySliceApproxEqual deprecated

func ArraySliceApproxEqual(left arrow.Array, lbeg, lend int64, right arrow.Array, rbeg, rend int64, opts ...EqualOption) bool

ArraySliceApproxEqual reports whether slices left[lbeg:lend] and right[rbeg:rend] are approximately equal.

Deprecated: renamed to just SliceApproxEqual and will be removed in v9. Please update calling code to just call array.SliceApproxEqual.

func ArraySliceEqual deprecated

func ArraySliceEqual(left arrow.Array, lbeg, lend int64, right arrow.Array, rbeg, rend int64) bool

ArraySliceEqual reports whether slices left[lbeg:lend] and right[rbeg:rend] are equal.

Deprecated: Renamed to just array.SliceEqual, this currently will just delegate to the renamed function and will be removed in v9. Please update any calling code.

func ChunkedApproxEqual

func ChunkedApproxEqual(left, right *arrow.Chunked, opts ...EqualOption) bool

ChunkedApproxEqual reports whether two chunked arrays are approximately equal regardless of their chunkings for non-floating point arrays, this is equivalent to ChunkedEqual

func ChunkedEqual

func ChunkedEqual(left, right *arrow.Chunked) bool

ChunkedEqual reports whether two chunked arrays are equal regardless of their chunkings

func ChunkedFromJSON

func ChunkedFromJSON(mem memory.Allocator, dt arrow.DataType, chunkStrs []string, opts ...FromJSONOption) (*arrow.Chunked, error)

func Concatenate

func Concatenate(arrs []arrow.Array, mem memory.Allocator) (result arrow.Array, err error)

Concatenate creates a new arrow.Array which is the concatenation of the passed in arrays. Returns nil if an error is encountered.

The passed in arrays still need to be released manually, and will not be released by this function.

func DictArrayFromJSON

func DictArrayFromJSON(mem memory.Allocator, dt *arrow.DictionaryType, indicesJSON, dictJSON string) (arrow.Array, error)

func Equal

func Equal(left, right arrow.Array) bool

Equal reports whether the two provided arrays are equal.

func FromJSON

func FromJSON(mem memory.Allocator, dt arrow.DataType, r io.Reader, opts ...FromJSONOption) (arr arrow.Array, offset int64, err error)

FromJSON creates an arrow.Array from a corresponding JSON stream and defined data type. If the types in the json do not match the type provided, it will return errors. This is *not* the integration test format and should not be used as such. This intended to be used by consumers more similarly to the current exposing of the csv reader/writer. It also returns the input offset in the reader where it finished decoding since buffering by the decoder could leave the reader's cursor past where the parsing finished if attempting to parse multiple json arrays from one stream.

All the Array types implement json.Marshaller and thus can be written to json using the json.Marshal function

The JSON provided must be formatted in one of two ways:

Default: the top level of the json must be a list which matches the type specified exactly
Example: `[1, 2, 3, 4, 5]` for any integer type or `[[...], null, [], .....]` for a List type
			Struct arrays are represented a list of objects: `[{"foo": 1, "bar": "moo"}, {"foo": 5, "bar": "baz"}]`

Using WithMultipleDocs:
	If the JSON provided is multiple newline separated json documents, then use this option
	and each json document will be treated as a single row of the array. This is most useful for record batches
	and interacting with other processes that use json. For example:
		`{"col1": 1, "col2": "row1", "col3": ...}\n{"col1": 2, "col2": "row2", "col3": ...}\n.....`

Duration values get formated upon marshalling as a string consisting of their numeric value followed by the unit suffix such as "10s" for a value of 10 and unit of Seconds. with "ms" for millisecond, "us" for microsecond, and "ns" for nanosecond as the suffixes. Unmarshalling duration values is more permissive since it first tries to use Go's time.ParseDuration function which means it allows values in the form 3h25m0.3s in addition to the same values which are output.

Interval types are marshalled / unmarshalled as follows:

 MonthInterval is marshalled as an object with the format:
	 { "months": #}
 DayTimeInterval is marshalled using Go's regular marshalling of structs:
	 { "days": #, "milliseconds": # }
 MonthDayNanoInterval values are marshalled the same as DayTime using Go's struct marshalling:
  { "months": #, "days": #, "nanoseconds": # }

Times use a format of HH:MM or HH:MM:SS[.zzz] where the fractions of a second cannot exceed the precision allowed by the time unit, otherwise unmarshalling will error.

Dates use YYYY-MM-DD format

Timestamps use RFC3339Nano format except without a timezone, all of the following are valid:

	YYYY-MM-DD
	YYYY-MM-DD[T]HH
	YYYY-MM-DD[T]HH:MM
 YYYY-MM-DD[T]HH:MM:SS[.zzzzzzzzzz]

The fractions of a second cannot exceed the precision allowed by the timeunit of the datatype.

When processing structs as objects order of keys does not matter, but keys cannot be repeated.

func Hash

func Hash(h *maphash.Hash, data arrow.ArrayData)

func IsTrivialTransposition

func IsTrivialTransposition(transposeMap []int32) bool

func MakeArrayOfNull

func MakeArrayOfNull(mem memory.Allocator, dt arrow.DataType, length int) arrow.Array

MakeArrayOfNull creates an array of size length which is all null of the given data type.

func MakeFromData

func MakeFromData(data arrow.ArrayData) arrow.Array

MakeFromData constructs a strongly-typed array instance from generic Data.

func NewChunkedSlice

func NewChunkedSlice(a *arrow.Chunked, i, j int64) *arrow.Chunked

NewChunkedSlice constructs a zero-copy slice of the chunked array with the indicated indices i and j, corresponding to array[i:j]. The returned chunked array must be Release()'d after use.

NewSlice panics if the slice is outside the valid range of the input array. NewSlice panics if j < i.

func NewColumnSlice

func NewColumnSlice(col *arrow.Column, i, j int64) *arrow.Column

NewColumnSlice returns a new zero-copy slice of the column with the indicated indices i and j, corresponding to the column's array[i:j]. The returned column must be Release()'d after use.

NewColSlice panics if the slice is outside the valid range of the column's array. NewColSlice panics if j < i.

func NewExtensionArrayWithStorage

func NewExtensionArrayWithStorage(dt arrow.ExtensionType, storage arrow.Array) arrow.Array

NewExtensionArrayWithStorage constructs a new ExtensionArray from the provided ExtensionType and uses the provided storage interface as the underlying storage. This will not release the storage array passed in so consumers should call Release on it manually while the new Extension array will share references to the underlying Data buffers.

func NewIntervalData

func NewIntervalData(data arrow.ArrayData) arrow.Array

func NewRecord

func NewRecord(schema *arrow.Schema, cols []arrow.Array, nrows int64) *simpleRecord

NewRecord returns a basic, non-lazy in-memory record batch.

NewRecord panics if the columns and schema are inconsistent. NewRecord panics if rows is larger than the height of the columns.

func NewRecordReader

func NewRecordReader(schema *arrow.Schema, recs []arrow.Record) (*simpleRecords, error)

NewRecordReader returns a simple iterator over the given slice of records.

func NewSlice

func NewSlice(arr arrow.Array, i, j int64) arrow.Array

NewSlice constructs a zero-copy slice of the array with the indicated indices i and j, corresponding to array[i:j]. The returned array must be Release()'d after use.

NewSlice panics if the slice is outside the valid range of the input array. NewSlice panics if j < i.

func NewSliceData

func NewSliceData(data arrow.ArrayData, i, j int64) arrow.ArrayData

NewSliceData returns a new slice that shares backing data with the input. The returned Data slice starts at i and extends j-i elements, such as:

slice := data[i:j]

The returned value must be Release'd after use.

NewSliceData panics if the slice is outside the valid range of the input Data. NewSliceData panics if j < i.

func NewTable

func NewTable(schema *arrow.Schema, cols []arrow.Column, rows int64) *simpleTable

NewTable returns a new basic, non-lazy in-memory table. If rows is negative, the number of rows will be inferred from the height of the columns.

NewTable panics if the columns and schema are inconsistent. NewTable panics if rows is larger than the height of the columns.

func NewTableFromRecords

func NewTableFromRecords(schema *arrow.Schema, recs []arrow.Record) *simpleTable

NewTableFromRecords returns a new basic, non-lazy in-memory table.

NewTableFromRecords panics if the records and schema are inconsistent.

func RecordApproxEqual

func RecordApproxEqual(left, right arrow.Record, opts ...EqualOption) bool

RecordApproxEqual reports whether the two provided records are approximately equal. For non-floating point columns, it is equivalent to RecordEqual.

func RecordEqual

func RecordEqual(left, right arrow.Record) bool

RecordEqual reports whether the two provided records are equal.

func RecordFromJSON

func RecordFromJSON(mem memory.Allocator, schema *arrow.Schema, r io.Reader, opts ...FromJSONOption) (arrow.Record, int64, error)

RecordFromJSON creates a record batch from JSON data. See array.FromJSON for the details of formatting and logic.

A record batch from JSON is equivalent to reading a struct array in from json and then converting it to a record batch.

func RecordFromStructArray

func RecordFromStructArray(in *Struct, schema *arrow.Schema) arrow.Record

RecordFromStructArray is a convenience function for converting a struct array into a record batch without copying the data. If the passed in schema is nil, the fields of the struct will be used to define the record batch. Otherwise the passed in schema will be used to create the record batch. If passed in, the schema must match the fields of the struct column.

func RecordToJSON

func RecordToJSON(rec arrow.Record, w io.Writer) error

RecordToJSON writes out the given record following the format of each row is a single object on a single line of the output.

func SliceApproxEqual

func SliceApproxEqual(left arrow.Array, lbeg, lend int64, right arrow.Array, rbeg, rend int64, opts ...EqualOption) bool

SliceApproxEqual reports whether slices left[lbeg:lend] and right[rbeg:rend] are approximately equal.

func SliceEqual

func SliceEqual(left arrow.Array, lbeg, lend int64, right arrow.Array, rbeg, rend int64) bool

SliceEqual reports whether slices left[lbeg:lend] and right[rbeg:rend] are equal.

func TableApproxEqual

func TableApproxEqual(left, right arrow.Table, opts ...EqualOption) bool

TableEqual returns if the two tables have the approximately equal data in the same schema

func TableEqual

func TableEqual(left, right arrow.Table) bool

TableEqual returns if the two tables have the same data in the same schema

func TableFromJSON

func TableFromJSON(mem memory.Allocator, sc *arrow.Schema, recJSON []string, opt ...FromJSONOption) (arrow.Table, error)

func TransposeDictIndices

func TransposeDictIndices(mem memory.Allocator, data arrow.ArrayData, inType, outType arrow.DataType, dict arrow.ArrayData, transposeMap []int32) (arrow.ArrayData, error)

func UnifyChunkedDicts

func UnifyChunkedDicts(alloc memory.Allocator, chnkd *arrow.Chunked) (*arrow.Chunked, error)

UnifyChunkedDicts takes a chunked array of dictionary type and will unify the dictionary across all of the chunks with the returned chunked array having all chunks share the same dictionary.

The return from this *must* have Release called on it unless an error is returned in which case the *arrow.Chunked will be nil.

If there is 1 or fewer chunks, then nothing is modified and this function will just call Retain on the passed in Chunked array (so Release can safely be called on it). The same is true if the type of the array is not a dictionary or if no changes are needed for all of the chunks to be using the same dictionary.

func UnifyTableDicts

func UnifyTableDicts(alloc memory.Allocator, table arrow.Table) (arrow.Table, error)

UnifyTableDicts performs UnifyChunkedDicts on each column of the table so that any dictionary column will have the dictionaries of its chunks unified.

The returned Table should always be Release'd unless a non-nil error was returned, in which case the table returned will be nil.

Types

type Binary

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

A type which represents an immutable sequence of variable-length binary strings.

func NewBinaryData

func NewBinaryData(data arrow.ArrayData) *Binary

NewBinaryData constructs a new Binary array from data.

func (*Binary) Data

func (a *Binary) Data() arrow.ArrayData

func (*Binary) DataType

func (a *Binary) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*Binary) IsNull

func (a *Binary) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Binary) IsValid

func (a *Binary) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Binary) Len

func (a *Binary) Len() int

Len returns the number of elements in the array.

func (*Binary) MarshalJSON

func (a *Binary) MarshalJSON() ([]byte, error)

func (*Binary) NullBitmapBytes

func (a *Binary) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*Binary) NullN

func (a *Binary) NullN() int

NullN returns the number of null values in the array.

func (*Binary) Offset

func (a *Binary) Offset() int

func (*Binary) Release

func (a *Binary) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Binary) Retain

func (a *Binary) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Binary) String

func (a *Binary) String() string

func (*Binary) Value

func (a *Binary) Value(i int) []byte

Value returns the slice at index i. This value should not be mutated.

func (*Binary) ValueBytes

func (a *Binary) ValueBytes() []byte

func (*Binary) ValueLen

func (a *Binary) ValueLen(i int) int

func (*Binary) ValueOffset

func (a *Binary) ValueOffset(i int) int

func (*Binary) ValueOffset64

func (a *Binary) ValueOffset64(i int) int64

func (*Binary) ValueOffsets

func (a *Binary) ValueOffsets() []int32

func (*Binary) ValueString

func (a *Binary) ValueString(i int) string

ValueString returns the string at index i without performing additional allocations. The string is only valid for the lifetime of the Binary array.

type BinaryBuilder

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

A BinaryBuilder is used to build a Binary array using the Append methods.

func NewBinaryBuilder

func NewBinaryBuilder(mem memory.Allocator, dtype arrow.BinaryDataType) *BinaryBuilder

NewBinaryBuilder can be used for any of the variable length binary types, Binary, LargeBinary, String, LargeString by passing the appropriate data type

func (*BinaryBuilder) Append

func (b *BinaryBuilder) Append(v []byte)

func (*BinaryBuilder) AppendEmptyValue

func (b *BinaryBuilder) AppendEmptyValue()

func (*BinaryBuilder) AppendNull

func (b *BinaryBuilder) AppendNull()

func (*BinaryBuilder) AppendString

func (b *BinaryBuilder) AppendString(v string)

func (*BinaryBuilder) AppendStringValues

func (b *BinaryBuilder) AppendStringValues(v []string, valid []bool)

AppendStringValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*BinaryBuilder) AppendValues

func (b *BinaryBuilder) AppendValues(v [][]byte, valid []bool)

AppendValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*BinaryBuilder) Cap

func (b *BinaryBuilder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*BinaryBuilder) DataCap

func (b *BinaryBuilder) DataCap() int

DataCap returns the total number of bytes that can be stored without allocating additional memory.

func (*BinaryBuilder) DataLen

func (b *BinaryBuilder) DataLen() int

DataLen returns the number of bytes in the data array.

func (*BinaryBuilder) Len

func (b *BinaryBuilder) Len() int

Len returns the number of elements in the array builder.

func (*BinaryBuilder) NewArray

func (b *BinaryBuilder) NewArray() arrow.Array

NewArray creates a Binary array from the memory buffers used by the builder and resets the BinaryBuilder so it can be used to build a new array.

Builds the appropriate Binary or LargeBinary array based on the datatype it was initialized with.

func (*BinaryBuilder) NewBinaryArray

func (b *BinaryBuilder) NewBinaryArray() (a *Binary)

NewBinaryArray creates a Binary array from the memory buffers used by the builder and resets the BinaryBuilder so it can be used to build a new array.

func (*BinaryBuilder) NewLargeBinaryArray

func (b *BinaryBuilder) NewLargeBinaryArray() (a *LargeBinary)

func (*BinaryBuilder) NullN

func (b *BinaryBuilder) NullN() int

NullN returns the number of null values in the array builder.

func (*BinaryBuilder) Release

func (b *BinaryBuilder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed. Release may be called simultaneously from multiple goroutines.

func (*BinaryBuilder) Reserve

func (b *BinaryBuilder) Reserve(n int)

Reserve ensures there is enough space for appending n elements by checking the capacity and calling Resize if necessary.

func (*BinaryBuilder) ReserveData

func (b *BinaryBuilder) ReserveData(n int)

ReserveData ensures there is enough space for appending n bytes by checking the capacity and resizing the data buffer if necessary.

func (*BinaryBuilder) Resize

func (b *BinaryBuilder) Resize(n int)

Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), additional memory will be allocated. If n is smaller, the allocated memory may be reduced.

func (*BinaryBuilder) ResizeData

func (b *BinaryBuilder) ResizeData(n int)

func (*BinaryBuilder) Retain

func (b *BinaryBuilder) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*BinaryBuilder) Type

func (b *BinaryBuilder) Type() arrow.DataType

func (*BinaryBuilder) UnmarshalJSON

func (b *BinaryBuilder) UnmarshalJSON(data []byte) error

func (*BinaryBuilder) UnsafeAppend

func (b *BinaryBuilder) UnsafeAppend(v []byte)

func (*BinaryBuilder) UnsafeAppendBoolToBitmap

func (b *BinaryBuilder) UnsafeAppendBoolToBitmap(isValid bool)

func (*BinaryBuilder) Value

func (b *BinaryBuilder) Value(i int) []byte

type BinaryDictionaryBuilder

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

func (*BinaryDictionaryBuilder) Append

func (b *BinaryDictionaryBuilder) Append(v []byte) error

func (*BinaryDictionaryBuilder) AppendArray

func (b *BinaryDictionaryBuilder) AppendArray(arr arrow.Array) error

func (*BinaryDictionaryBuilder) AppendEmptyValue

func (b *BinaryDictionaryBuilder) AppendEmptyValue()

func (*BinaryDictionaryBuilder) AppendNull

func (b *BinaryDictionaryBuilder) AppendNull()

func (*BinaryDictionaryBuilder) AppendString

func (b *BinaryDictionaryBuilder) AppendString(v string) error

func (*BinaryDictionaryBuilder) Cap

func (b *BinaryDictionaryBuilder) Cap() int

func (*BinaryDictionaryBuilder) InsertDictValues

func (b *BinaryDictionaryBuilder) InsertDictValues(arr *Binary) (err error)

func (*BinaryDictionaryBuilder) InsertStringDictValues

func (b *BinaryDictionaryBuilder) InsertStringDictValues(arr *String) (err error)

func (*BinaryDictionaryBuilder) NewArray

func (b *BinaryDictionaryBuilder) NewArray() arrow.Array

func (*BinaryDictionaryBuilder) NewDelta

func (b *BinaryDictionaryBuilder) NewDelta() (indices, delta arrow.Array, err error)

NewDelta returns the dictionary indices and a delta dictionary since the last time NewArray or NewDictionaryArray were called, and resets the state of the builder (except for the dictionary / memotable)

func (*BinaryDictionaryBuilder) NewDictionaryArray

func (b *BinaryDictionaryBuilder) NewDictionaryArray() *Dictionary

func (*BinaryDictionaryBuilder) Release

func (b *BinaryDictionaryBuilder) Release()

func (*BinaryDictionaryBuilder) Reserve

func (b *BinaryDictionaryBuilder) Reserve(n int)

func (*BinaryDictionaryBuilder) ResetFull

func (b *BinaryDictionaryBuilder) ResetFull()

func (*BinaryDictionaryBuilder) Resize

func (b *BinaryDictionaryBuilder) Resize(n int)

func (*BinaryDictionaryBuilder) Type

func (b *BinaryDictionaryBuilder) Type() arrow.DataType

func (*BinaryDictionaryBuilder) UnmarshalJSON

func (b *BinaryDictionaryBuilder) UnmarshalJSON(data []byte) error

UnmarshalJSON is not yet implemented for dictionary builders and will always error.

type BinaryLike

type BinaryLike interface {
	arrow.Array
	ValueBytes() []byte
	ValueOffset64(int) int64
}

type Boolean

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

A type which represents an immutable sequence of boolean values.

func NewBoolean

func NewBoolean(length int, data *memory.Buffer, nullBitmap *memory.Buffer, nulls int) *Boolean

NewBoolean creates a boolean array from the data memory.Buffer and contains length elements. The nullBitmap buffer can be nil of there are no null values. If nulls is not known, use UnknownNullCount to calculate the value of NullN at runtime from the nullBitmap buffer.

func NewBooleanData

func NewBooleanData(data arrow.ArrayData) *Boolean

func (*Boolean) Data

func (a *Boolean) Data() arrow.ArrayData

func (*Boolean) DataType

func (a *Boolean) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*Boolean) IsNull

func (a *Boolean) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Boolean) IsValid

func (a *Boolean) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Boolean) Len

func (a *Boolean) Len() int

Len returns the number of elements in the array.

func (*Boolean) MarshalJSON

func (a *Boolean) MarshalJSON() ([]byte, error)

func (*Boolean) NullBitmapBytes

func (a *Boolean) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*Boolean) NullN

func (a *Boolean) NullN() int

NullN returns the number of null values in the array.

func (*Boolean) Offset

func (a *Boolean) Offset() int

func (*Boolean) Release

func (a *Boolean) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Boolean) Retain

func (a *Boolean) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Boolean) String

func (a *Boolean) String() string

func (*Boolean) Value

func (a *Boolean) Value(i int) bool

type BooleanBuilder

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

func NewBooleanBuilder

func NewBooleanBuilder(mem memory.Allocator) *BooleanBuilder

func (*BooleanBuilder) Append

func (b *BooleanBuilder) Append(v bool)

func (*BooleanBuilder) AppendByte

func (b *BooleanBuilder) AppendByte(v byte)

func (*BooleanBuilder) AppendEmptyValue

func (b *BooleanBuilder) AppendEmptyValue()

func (*BooleanBuilder) AppendNull

func (b *BooleanBuilder) AppendNull()

func (*BooleanBuilder) AppendValues

func (b *BooleanBuilder) AppendValues(v []bool, valid []bool)

func (*BooleanBuilder) Cap

func (b *BooleanBuilder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*BooleanBuilder) Len

func (b *BooleanBuilder) Len() int

Len returns the number of elements in the array builder.

func (*BooleanBuilder) NewArray

func (b *BooleanBuilder) NewArray() arrow.Array

NewArray creates a Boolean array from the memory buffers used by the builder and resets the BooleanBuilder so it can be used to build a new array.

func (*BooleanBuilder) NewBooleanArray

func (b *BooleanBuilder) NewBooleanArray() (a *Boolean)

NewBooleanArray creates a Boolean array from the memory buffers used by the builder and resets the BooleanBuilder so it can be used to build a new array.

func (*BooleanBuilder) NullN

func (b *BooleanBuilder) NullN() int

NullN returns the number of null values in the array builder.

func (*BooleanBuilder) Release

func (b *BooleanBuilder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed. Release may be called simultaneously from multiple goroutines.

func (*BooleanBuilder) Reserve

func (b *BooleanBuilder) Reserve(n int)

Reserve ensures there is enough space for appending n elements by checking the capacity and calling Resize if necessary.

func (*BooleanBuilder) Resize

func (b *BooleanBuilder) Resize(n int)

Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), additional memory will be allocated. If n is smaller, the allocated memory may reduced.

func (*BooleanBuilder) Retain

func (b *BooleanBuilder) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*BooleanBuilder) Type

func (b *BooleanBuilder) Type() arrow.DataType

func (*BooleanBuilder) UnmarshalJSON

func (b *BooleanBuilder) UnmarshalJSON(data []byte) error

func (*BooleanBuilder) UnsafeAppend

func (b *BooleanBuilder) UnsafeAppend(v bool)

func (*BooleanBuilder) UnsafeAppendBoolToBitmap

func (b *BooleanBuilder) UnsafeAppendBoolToBitmap(isValid bool)

type Builder

type Builder interface {
	// you can unmarshal a json array to add the values to a builder
	json.Unmarshaler

	// Type returns the datatype that this is building
	Type() arrow.DataType

	// Retain increases the reference count by 1.
	// Retain may be called simultaneously from multiple goroutines.
	Retain()

	// Release decreases the reference count by 1.
	Release()

	// Len returns the number of elements in the array builder.
	Len() int

	// Cap returns the total number of elements that can be stored
	// without allocating additional memory.
	Cap() int

	// NullN returns the number of null values in the array builder.
	NullN() int

	// AppendNull adds a new null value to the array being built.
	AppendNull()

	// AppendEmptyValue adds a new zero value of the appropriate type
	AppendEmptyValue()

	// Reserve ensures there is enough space for appending n elements
	// by checking the capacity and calling Resize if necessary.
	Reserve(n int)

	// Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(),
	// additional memory will be allocated. If n is smaller, the allocated memory may reduced.
	Resize(n int)

	// NewArray creates a new array from the memory buffers used
	// by the builder and resets the Builder so it can be used to build
	// a new array.
	NewArray() arrow.Array

	UnsafeAppendBoolToBitmap(bool)
	// contains filtered or unexported methods
}

Builder provides an interface to build arrow arrays.

func NewBuilder

func NewBuilder(mem memory.Allocator, dtype arrow.DataType) Builder

type Data

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

Data represents the memory and metadata of an Arrow array.

func NewData

func NewData(dtype arrow.DataType, length int, buffers []*memory.Buffer, childData []arrow.ArrayData, nulls, offset int) *Data

NewData creates a new Data.

func NewDataWithDictionary

func NewDataWithDictionary(dtype arrow.DataType, length int, buffers []*memory.Buffer, nulls, offset int, dict *Data) *Data

NewDataWithDictionary creates a new data object, but also sets the provided dictionary into the data if it's not nil

func (*Data) Buffers

func (d *Data) Buffers() []*memory.Buffer

Buffers returns the buffers.

func (*Data) Children

func (d *Data) Children() []arrow.ArrayData

func (*Data) Copy

func (d *Data) Copy() *Data

func (*Data) DataType

func (d *Data) DataType() arrow.DataType

DataType returns the DataType of the data.

func (*Data) Dictionary

func (d *Data) Dictionary() arrow.ArrayData

Dictionary returns the ArrayData object for the dictionary member, or nil

func (*Data) Len

func (d *Data) Len() int

Len returns the length.

func (*Data) NullN

func (d *Data) NullN() int

NullN returns the number of nulls.

func (*Data) Offset

func (d *Data) Offset() int

Offset returns the offset.

func (*Data) Release

func (d *Data) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed. Release may be called simultaneously from multiple goroutines.

func (*Data) Reset

func (d *Data) Reset(dtype arrow.DataType, length int, buffers []*memory.Buffer, childData []arrow.ArrayData, nulls, offset int)

Reset sets the Data for re-use.

func (*Data) Retain

func (d *Data) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Data) SetDictionary

func (d *Data) SetDictionary(dict arrow.ArrayData)

SetDictionary allows replacing the dictionary for this particular Data object

func (*Data) SetNullN

func (d *Data) SetNullN(n int)

type Date32

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

A type which represents an immutable sequence of arrow.Date32 values.

func NewDate32Data

func NewDate32Data(data arrow.ArrayData) *Date32

NewDate32Data creates a new Date32.

func (*Date32) Data

func (a *Date32) Data() arrow.ArrayData

func (*Date32) DataType

func (a *Date32) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*Date32) Date32Values

func (a *Date32) Date32Values() []arrow.Date32

Values returns the values.

func (*Date32) IsNull

func (a *Date32) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Date32) IsValid

func (a *Date32) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Date32) Len

func (a *Date32) Len() int

Len returns the number of elements in the array.

func (*Date32) MarshalJSON

func (a *Date32) MarshalJSON() ([]byte, error)

func (*Date32) NullBitmapBytes

func (a *Date32) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*Date32) NullN

func (a *Date32) NullN() int

NullN returns the number of null values in the array.

func (*Date32) Offset

func (a *Date32) Offset() int

func (*Date32) Release

func (a *Date32) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Date32) Reset

func (a *Date32) Reset(data *Data)

Reset resets the array for re-use.

func (*Date32) Retain

func (a *Date32) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Date32) String

func (a *Date32) String() string

String returns a string representation of the array.

func (*Date32) Value

func (a *Date32) Value(i int) arrow.Date32

Value returns the value at the specified index.

type Date32Builder

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

func NewDate32Builder

func NewDate32Builder(mem memory.Allocator) *Date32Builder

func (*Date32Builder) Append

func (b *Date32Builder) Append(v arrow.Date32)

func (*Date32Builder) AppendEmptyValue

func (b *Date32Builder) AppendEmptyValue()

func (*Date32Builder) AppendNull

func (b *Date32Builder) AppendNull()

func (*Date32Builder) AppendValues

func (b *Date32Builder) AppendValues(v []arrow.Date32, valid []bool)

AppendValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*Date32Builder) Cap

func (b *Date32Builder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*Date32Builder) Len

func (b *Date32Builder) Len() int

Len returns the number of elements in the array builder.

func (*Date32Builder) NewArray

func (b *Date32Builder) NewArray() arrow.Array

NewArray creates a Date32 array from the memory buffers used by the builder and resets the Date32Builder so it can be used to build a new array.

func (*Date32Builder) NewDate32Array

func (b *Date32Builder) NewDate32Array() (a *Date32)

NewDate32Array creates a Date32 array from the memory buffers used by the builder and resets the Date32Builder so it can be used to build a new array.

func (*Date32Builder) NullN

func (b *Date32Builder) NullN() int

NullN returns the number of null values in the array builder.

func (*Date32Builder) Release

func (b *Date32Builder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed.

func (*Date32Builder) Reserve

func (b *Date32Builder) Reserve(n int)

Reserve ensures there is enough space for appending n elements by checking the capacity and calling Resize if necessary.

func (*Date32Builder) Resize

func (b *Date32Builder) Resize(n int)

Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), additional memory will be allocated. If n is smaller, the allocated memory may reduced.

func (*Date32Builder) Retain

func (b *Date32Builder) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Date32Builder) Type

func (b *Date32Builder) Type() arrow.DataType

func (*Date32Builder) UnmarshalJSON

func (b *Date32Builder) UnmarshalJSON(data []byte) error

func (*Date32Builder) UnsafeAppend

func (b *Date32Builder) UnsafeAppend(v arrow.Date32)

func (*Date32Builder) UnsafeAppendBoolToBitmap

func (b *Date32Builder) UnsafeAppendBoolToBitmap(isValid bool)

type Date32DictionaryBuilder

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

func (*Date32DictionaryBuilder) Append

func (*Date32DictionaryBuilder) AppendArray

func (b *Date32DictionaryBuilder) AppendArray(arr arrow.Array) error

func (*Date32DictionaryBuilder) AppendEmptyValue

func (b *Date32DictionaryBuilder) AppendEmptyValue()

func (*Date32DictionaryBuilder) AppendNull

func (b *Date32DictionaryBuilder) AppendNull()

func (*Date32DictionaryBuilder) Cap

func (b *Date32DictionaryBuilder) Cap() int

func (*Date32DictionaryBuilder) InsertDictValues

func (b *Date32DictionaryBuilder) InsertDictValues(arr *Date32) (err error)

func (*Date32DictionaryBuilder) NewArray

func (b *Date32DictionaryBuilder) NewArray() arrow.Array

func (*Date32DictionaryBuilder) NewDelta

func (b *Date32DictionaryBuilder) NewDelta() (indices, delta arrow.Array, err error)

NewDelta returns the dictionary indices and a delta dictionary since the last time NewArray or NewDictionaryArray were called, and resets the state of the builder (except for the dictionary / memotable)

func (*Date32DictionaryBuilder) NewDictionaryArray

func (b *Date32DictionaryBuilder) NewDictionaryArray() *Dictionary

func (*Date32DictionaryBuilder) Release

func (b *Date32DictionaryBuilder) Release()

func (*Date32DictionaryBuilder) Reserve

func (b *Date32DictionaryBuilder) Reserve(n int)

func (*Date32DictionaryBuilder) ResetFull

func (b *Date32DictionaryBuilder) ResetFull()

func (*Date32DictionaryBuilder) Resize

func (b *Date32DictionaryBuilder) Resize(n int)

func (*Date32DictionaryBuilder) Type

func (b *Date32DictionaryBuilder) Type() arrow.DataType

func (*Date32DictionaryBuilder) UnmarshalJSON

func (b *Date32DictionaryBuilder) UnmarshalJSON(data []byte) error

UnmarshalJSON is not yet implemented for dictionary builders and will always error.

type Date64

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

A type which represents an immutable sequence of arrow.Date64 values.

func NewDate64Data

func NewDate64Data(data arrow.ArrayData) *Date64

NewDate64Data creates a new Date64.

func (*Date64) Data

func (a *Date64) Data() arrow.ArrayData

func (*Date64) DataType

func (a *Date64) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*Date64) Date64Values

func (a *Date64) Date64Values() []arrow.Date64

Values returns the values.

func (*Date64) IsNull

func (a *Date64) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Date64) IsValid

func (a *Date64) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Date64) Len

func (a *Date64) Len() int

Len returns the number of elements in the array.

func (*Date64) MarshalJSON

func (a *Date64) MarshalJSON() ([]byte, error)

func (*Date64) NullBitmapBytes

func (a *Date64) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*Date64) NullN

func (a *Date64) NullN() int

NullN returns the number of null values in the array.

func (*Date64) Offset

func (a *Date64) Offset() int

func (*Date64) Release

func (a *Date64) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Date64) Reset

func (a *Date64) Reset(data *Data)

Reset resets the array for re-use.

func (*Date64) Retain

func (a *Date64) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Date64) String

func (a *Date64) String() string

String returns a string representation of the array.

func (*Date64) Value

func (a *Date64) Value(i int) arrow.Date64

Value returns the value at the specified index.

type Date64Builder

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

func NewDate64Builder

func NewDate64Builder(mem memory.Allocator) *Date64Builder

func (*Date64Builder) Append

func (b *Date64Builder) Append(v arrow.Date64)

func (*Date64Builder) AppendEmptyValue

func (b *Date64Builder) AppendEmptyValue()

func (*Date64Builder) AppendNull

func (b *Date64Builder) AppendNull()

func (*Date64Builder) AppendValues

func (b *Date64Builder) AppendValues(v []arrow.Date64, valid []bool)

AppendValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*Date64Builder) Cap

func (b *Date64Builder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*Date64Builder) Len

func (b *Date64Builder) Len() int

Len returns the number of elements in the array builder.

func (*Date64Builder) NewArray

func (b *Date64Builder) NewArray() arrow.Array

NewArray creates a Date64 array from the memory buffers used by the builder and resets the Date64Builder so it can be used to build a new array.

func (*Date64Builder) NewDate64Array

func (b *Date64Builder) NewDate64Array() (a *Date64)

NewDate64Array creates a Date64 array from the memory buffers used by the builder and resets the Date64Builder so it can be used to build a new array.

func (*Date64Builder) NullN

func (b *Date64Builder) NullN() int

NullN returns the number of null values in the array builder.

func (*Date64Builder) Release

func (b *Date64Builder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed.

func (*Date64Builder) Reserve

func (b *Date64Builder) Reserve(n int)

Reserve ensures there is enough space for appending n elements by checking the capacity and calling Resize if necessary.

func (*Date64Builder) Resize

func (b *Date64Builder) Resize(n int)

Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), additional memory will be allocated. If n is smaller, the allocated memory may reduced.

func (*Date64Builder) Retain

func (b *Date64Builder) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Date64Builder) Type

func (b *Date64Builder) Type() arrow.DataType

func (*Date64Builder) UnmarshalJSON

func (b *Date64Builder) UnmarshalJSON(data []byte) error

func (*Date64Builder) UnsafeAppend

func (b *Date64Builder) UnsafeAppend(v arrow.Date64)

func (*Date64Builder) UnsafeAppendBoolToBitmap

func (b *Date64Builder) UnsafeAppendBoolToBitmap(isValid bool)

type Date64DictionaryBuilder

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

func (*Date64DictionaryBuilder) Append

func (*Date64DictionaryBuilder) AppendArray

func (b *Date64DictionaryBuilder) AppendArray(arr arrow.Array) error

func (*Date64DictionaryBuilder) AppendEmptyValue

func (b *Date64DictionaryBuilder) AppendEmptyValue()

func (*Date64DictionaryBuilder) AppendNull

func (b *Date64DictionaryBuilder) AppendNull()

func (*Date64DictionaryBuilder) Cap

func (b *Date64DictionaryBuilder) Cap() int

func (*Date64DictionaryBuilder) InsertDictValues

func (b *Date64DictionaryBuilder) InsertDictValues(arr *Date64) (err error)

func (*Date64DictionaryBuilder) NewArray

func (b *Date64DictionaryBuilder) NewArray() arrow.Array

func (*Date64DictionaryBuilder) NewDelta

func (b *Date64DictionaryBuilder) NewDelta() (indices, delta arrow.Array, err error)

NewDelta returns the dictionary indices and a delta dictionary since the last time NewArray or NewDictionaryArray were called, and resets the state of the builder (except for the dictionary / memotable)

func (*Date64DictionaryBuilder) NewDictionaryArray

func (b *Date64DictionaryBuilder) NewDictionaryArray() *Dictionary

func (*Date64DictionaryBuilder) Release

func (b *Date64DictionaryBuilder) Release()

func (*Date64DictionaryBuilder) Reserve

func (b *Date64DictionaryBuilder) Reserve(n int)

func (*Date64DictionaryBuilder) ResetFull

func (b *Date64DictionaryBuilder) ResetFull()

func (*Date64DictionaryBuilder) Resize

func (b *Date64DictionaryBuilder) Resize(n int)

func (*Date64DictionaryBuilder) Type

func (b *Date64DictionaryBuilder) Type() arrow.DataType

func (*Date64DictionaryBuilder) UnmarshalJSON

func (b *Date64DictionaryBuilder) UnmarshalJSON(data []byte) error

UnmarshalJSON is not yet implemented for dictionary builders and will always error.

type DayTimeDictionaryBuilder

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

func (*DayTimeDictionaryBuilder) Append

func (*DayTimeDictionaryBuilder) AppendArray

func (b *DayTimeDictionaryBuilder) AppendArray(arr arrow.Array) error

func (*DayTimeDictionaryBuilder) AppendEmptyValue

func (b *DayTimeDictionaryBuilder) AppendEmptyValue()

func (*DayTimeDictionaryBuilder) AppendNull

func (b *DayTimeDictionaryBuilder) AppendNull()

func (*DayTimeDictionaryBuilder) Cap

func (b *DayTimeDictionaryBuilder) Cap() int

func (*DayTimeDictionaryBuilder) InsertDictValues

func (b *DayTimeDictionaryBuilder) InsertDictValues(arr *DayTimeInterval) (err error)

func (*DayTimeDictionaryBuilder) NewArray

func (b *DayTimeDictionaryBuilder) NewArray() arrow.Array

func (*DayTimeDictionaryBuilder) NewDelta

func (b *DayTimeDictionaryBuilder) NewDelta() (indices, delta arrow.Array, err error)

NewDelta returns the dictionary indices and a delta dictionary since the last time NewArray or NewDictionaryArray were called, and resets the state of the builder (except for the dictionary / memotable)

func (*DayTimeDictionaryBuilder) NewDictionaryArray

func (b *DayTimeDictionaryBuilder) NewDictionaryArray() *Dictionary

func (*DayTimeDictionaryBuilder) Release

func (b *DayTimeDictionaryBuilder) Release()

func (*DayTimeDictionaryBuilder) Reserve

func (b *DayTimeDictionaryBuilder) Reserve(n int)

func (*DayTimeDictionaryBuilder) ResetFull

func (b *DayTimeDictionaryBuilder) ResetFull()

func (*DayTimeDictionaryBuilder) Resize

func (b *DayTimeDictionaryBuilder) Resize(n int)

func (*DayTimeDictionaryBuilder) Type

func (b *DayTimeDictionaryBuilder) Type() arrow.DataType

func (*DayTimeDictionaryBuilder) UnmarshalJSON

func (b *DayTimeDictionaryBuilder) UnmarshalJSON(data []byte) error

UnmarshalJSON is not yet implemented for dictionary builders and will always error.

type DayTimeInterval

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

A type which represents an immutable sequence of arrow.DayTimeInterval values.

func NewDayTimeIntervalData

func NewDayTimeIntervalData(data arrow.ArrayData) *DayTimeInterval

func (*DayTimeInterval) Data

func (a *DayTimeInterval) Data() arrow.ArrayData

func (*DayTimeInterval) DataType

func (a *DayTimeInterval) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*DayTimeInterval) DayTimeIntervalValues

func (a *DayTimeInterval) DayTimeIntervalValues() []arrow.DayTimeInterval

func (*DayTimeInterval) IsNull

func (a *DayTimeInterval) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*DayTimeInterval) IsValid

func (a *DayTimeInterval) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*DayTimeInterval) Len

func (a *DayTimeInterval) Len() int

Len returns the number of elements in the array.

func (*DayTimeInterval) MarshalJSON

func (a *DayTimeInterval) MarshalJSON() ([]byte, error)

MarshalJSON will marshal this array to JSON as an array of objects, consisting of the form {"days": #, "milliseconds": #} for each element.

func (*DayTimeInterval) NullBitmapBytes

func (a *DayTimeInterval) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*DayTimeInterval) NullN

func (a *DayTimeInterval) NullN() int

NullN returns the number of null values in the array.

func (*DayTimeInterval) Offset

func (a *DayTimeInterval) Offset() int

func (*DayTimeInterval) Release

func (a *DayTimeInterval) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*DayTimeInterval) Retain

func (a *DayTimeInterval) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*DayTimeInterval) String

func (a *DayTimeInterval) String() string

func (*DayTimeInterval) Value

type DayTimeIntervalBuilder

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

func NewDayTimeIntervalBuilder

func NewDayTimeIntervalBuilder(mem memory.Allocator) *DayTimeIntervalBuilder

func (*DayTimeIntervalBuilder) Append

func (*DayTimeIntervalBuilder) AppendEmptyValue

func (b *DayTimeIntervalBuilder) AppendEmptyValue()

func (*DayTimeIntervalBuilder) AppendNull

func (b *DayTimeIntervalBuilder) AppendNull()

func (*DayTimeIntervalBuilder) AppendValues

func (b *DayTimeIntervalBuilder) AppendValues(v []arrow.DayTimeInterval, valid []bool)

AppendValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*DayTimeIntervalBuilder) Cap

func (b *DayTimeIntervalBuilder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*DayTimeIntervalBuilder) Len

func (b *DayTimeIntervalBuilder) Len() int

Len returns the number of elements in the array builder.

func (*DayTimeIntervalBuilder) NewArray

func (b *DayTimeIntervalBuilder) NewArray() arrow.Array

NewArray creates a DayTimeInterval array from the memory buffers used by the builder and resets the DayTimeIntervalBuilder so it can be used to build a new array.

func (*DayTimeIntervalBuilder) NewDayTimeIntervalArray

func (b *DayTimeIntervalBuilder) NewDayTimeIntervalArray() (a *DayTimeInterval)

NewDayTimeIntervalArray creates a DayTimeInterval array from the memory buffers used by the builder and resets the DayTimeIntervalBuilder so it can be used to build a new array.

func (*DayTimeIntervalBuilder) NullN

func (b *DayTimeIntervalBuilder) NullN() int

NullN returns the number of null values in the array builder.

func (*DayTimeIntervalBuilder) Release

func (b *DayTimeIntervalBuilder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed.

func (*DayTimeIntervalBuilder) Reserve

func (b *DayTimeIntervalBuilder) Reserve(n int)

Reserve ensures there is enough space for appending n elements by checking the capacity and calling Resize if necessary.

func (*DayTimeIntervalBuilder) Resize

func (b *DayTimeIntervalBuilder) Resize(n int)

Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), additional memory will be allocated. If n is smaller, the allocated memory may reduced.

func (*DayTimeIntervalBuilder) Retain

func (b *DayTimeIntervalBuilder) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*DayTimeIntervalBuilder) Type

func (*DayTimeIntervalBuilder) UnmarshalJSON

func (b *DayTimeIntervalBuilder) UnmarshalJSON(data []byte) error

UnmarshalJSON will add the values unmarshalled from an array to the builder, with the values expected to be objects of the form {"days": #, "milliseconds": #}

func (*DayTimeIntervalBuilder) UnsafeAppend

func (b *DayTimeIntervalBuilder) UnsafeAppend(v arrow.DayTimeInterval)

func (*DayTimeIntervalBuilder) UnsafeAppendBoolToBitmap

func (b *DayTimeIntervalBuilder) UnsafeAppendBoolToBitmap(isValid bool)

type Decimal128

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

A type which represents an immutable sequence of 128-bit decimal values.

func NewDecimal128Data

func NewDecimal128Data(data arrow.ArrayData) *Decimal128

func (*Decimal128) Data

func (a *Decimal128) Data() arrow.ArrayData

func (*Decimal128) DataType

func (a *Decimal128) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*Decimal128) IsNull

func (a *Decimal128) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Decimal128) IsValid

func (a *Decimal128) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Decimal128) Len

func (a *Decimal128) Len() int

Len returns the number of elements in the array.

func (*Decimal128) MarshalJSON

func (a *Decimal128) MarshalJSON() ([]byte, error)

func (*Decimal128) NullBitmapBytes

func (a *Decimal128) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*Decimal128) NullN

func (a *Decimal128) NullN() int

NullN returns the number of null values in the array.

func (*Decimal128) Offset

func (a *Decimal128) Offset() int

func (*Decimal128) Release

func (a *Decimal128) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Decimal128) Retain

func (a *Decimal128) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Decimal128) String

func (a *Decimal128) String() string

func (*Decimal128) Value

func (a *Decimal128) Value(i int) decimal128.Num

func (*Decimal128) Values

func (a *Decimal128) Values() []decimal128.Num

type Decimal128Builder

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

func NewDecimal128Builder

func NewDecimal128Builder(mem memory.Allocator, dtype *arrow.Decimal128Type) *Decimal128Builder

func (*Decimal128Builder) Append

func (b *Decimal128Builder) Append(v decimal128.Num)

func (*Decimal128Builder) AppendEmptyValue

func (b *Decimal128Builder) AppendEmptyValue()

func (*Decimal128Builder) AppendNull

func (b *Decimal128Builder) AppendNull()

func (*Decimal128Builder) AppendValues

func (b *Decimal128Builder) AppendValues(v []decimal128.Num, valid []bool)

AppendValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*Decimal128Builder) Cap

func (b *Decimal128Builder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*Decimal128Builder) Len

func (b *Decimal128Builder) Len() int

Len returns the number of elements in the array builder.

func (*Decimal128Builder) NewArray

func (b *Decimal128Builder) NewArray() arrow.Array

NewArray creates a Decimal128 array from the memory buffers used by the builder and resets the Decimal128Builder so it can be used to build a new array.

func (*Decimal128Builder) NewDecimal128Array

func (b *Decimal128Builder) NewDecimal128Array() (a *Decimal128)

NewDecimal128Array creates a Decimal128 array from the memory buffers used by the builder and resets the Decimal128Builder so it can be used to build a new array.

func (*Decimal128Builder) NullN

func (b *Decimal128Builder) NullN() int

NullN returns the number of null values in the array builder.

func (*Decimal128Builder) Release

func (b *Decimal128Builder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed.

func (*Decimal128Builder) Reserve

func (b *Decimal128Builder) Reserve(n int)

Reserve ensures there is enough space for appending n elements by checking the capacity and calling Resize if necessary.

func (*Decimal128Builder) Resize

func (b *Decimal128Builder) Resize(n int)

Resize adjusts the space allocated by b to n elements. If n is greater than b.Cap(), additional memory will be allocated. If n is smaller, the allocated memory may reduced.

func (*Decimal128Builder) Retain

func (b *Decimal128Builder) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Decimal128Builder) Type

func (b *Decimal128Builder) Type() arrow.DataType

func (*Decimal128Builder) UnmarshalJSON

func (b *Decimal128Builder) UnmarshalJSON(data []byte) error

UnmarshalJSON will add the unmarshalled values to this builder.

If the values are strings, they will get parsed with big.ParseFloat using a rounding mode of big.ToNearestAway currently.

func (*Decimal128Builder) UnsafeAppend

func (b *Decimal128Builder) UnsafeAppend(v decimal128.Num)

func (*Decimal128Builder) UnsafeAppendBoolToBitmap

func (b *Decimal128Builder) UnsafeAppendBoolToBitmap(isValid bool)

type Decimal128DictionaryBuilder

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

func (*Decimal128DictionaryBuilder) Append

func (*Decimal128DictionaryBuilder) AppendArray

func (b *Decimal128DictionaryBuilder) AppendArray(arr arrow.Array) error

func (*Decimal128DictionaryBuilder) AppendEmptyValue

func (b *Decimal128DictionaryBuilder) AppendEmptyValue()

func (*Decimal128DictionaryBuilder) AppendNull

func (b *Decimal128DictionaryBuilder) AppendNull()

func (*Decimal128DictionaryBuilder) Cap

func (b *Decimal128DictionaryBuilder) Cap() int

func (*Decimal128DictionaryBuilder) InsertDictValues

func (b *Decimal128DictionaryBuilder) InsertDictValues(arr *Decimal128) (err error)

func (*Decimal128DictionaryBuilder) NewArray

func (b *Decimal128DictionaryBuilder) NewArray() arrow.Array

func (*Decimal128DictionaryBuilder) NewDelta

func (b *Decimal128DictionaryBuilder) NewDelta() (indices, delta arrow.Array, err error)

NewDelta returns the dictionary indices and a delta dictionary since the last time NewArray or NewDictionaryArray were called, and resets the state of the builder (except for the dictionary / memotable)

func (*Decimal128DictionaryBuilder) NewDictionaryArray

func (b *Decimal128DictionaryBuilder) NewDictionaryArray() *Dictionary

func (*Decimal128DictionaryBuilder) Release

func (b *Decimal128DictionaryBuilder) Release()

func (*Decimal128DictionaryBuilder) Reserve

func (b *Decimal128DictionaryBuilder) Reserve(n int)

func (*Decimal128DictionaryBuilder) ResetFull

func (b *Decimal128DictionaryBuilder) ResetFull()

func (*Decimal128DictionaryBuilder) Resize

func (b *Decimal128DictionaryBuilder) Resize(n int)

func (*Decimal128DictionaryBuilder) Type

func (b *Decimal128DictionaryBuilder) Type() arrow.DataType

func (*Decimal128DictionaryBuilder) UnmarshalJSON

func (b *Decimal128DictionaryBuilder) UnmarshalJSON(data []byte) error

UnmarshalJSON is not yet implemented for dictionary builders and will always error.

type Decimal256

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

Decimal256 is a type that represents an immutable sequence of 256-bit decimal values.

func NewDecimal256Data

func NewDecimal256Data(data arrow.ArrayData) *Decimal256

func (*Decimal256) Data

func (a *Decimal256) Data() arrow.ArrayData

func (*Decimal256) DataType

func (a *Decimal256) DataType() arrow.DataType

DataType returns the type metadata for this instance.

func (*Decimal256) IsNull

func (a *Decimal256) IsNull(i int) bool

IsNull returns true if value at index is null. NOTE: IsNull will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Decimal256) IsValid

func (a *Decimal256) IsValid(i int) bool

IsValid returns true if value at index is not null. NOTE: IsValid will panic if NullBitmapBytes is not empty and 0 > i ≥ Len.

func (*Decimal256) Len

func (a *Decimal256) Len() int

Len returns the number of elements in the array.

func (*Decimal256) MarshalJSON

func (a *Decimal256) MarshalJSON() ([]byte, error)

func (*Decimal256) NullBitmapBytes

func (a *Decimal256) NullBitmapBytes() []byte

NullBitmapBytes returns a byte slice of the validity bitmap.

func (*Decimal256) NullN

func (a *Decimal256) NullN() int

NullN returns the number of null values in the array.

func (*Decimal256) Offset

func (a *Decimal256) Offset() int

func (*Decimal256) Release

func (a *Decimal256) Release()

Release decreases the reference count by 1. Release may be called simultaneously from multiple goroutines. When the reference count goes to zero, the memory is freed.

func (*Decimal256) Retain

func (a *Decimal256) Retain()

Retain increases the reference count by 1. Retain may be called simultaneously from multiple goroutines.

func (*Decimal256) String

func (a *Decimal256) String() string

func (*Decimal256) Value

func (a *Decimal256) Value(i int) decimal256.Num

func (*Decimal256) Values

func (a *Decimal256) Values() []decimal256.Num

type Decimal256Builder

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

func NewDecimal256Builder

func NewDecimal256Builder(mem memory.Allocator, dtype *arrow.Decimal256Type) *Decimal256Builder

func (*Decimal256Builder) Append

func (b *Decimal256Builder) Append(v decimal256.Num)

func (*Decimal256Builder) AppendEmptyValue

func (b *Decimal256Builder) AppendEmptyValue()

func (*Decimal256Builder) AppendNull

func (b *Decimal256Builder) AppendNull()

func (*Decimal256Builder) AppendValues

func (b *Decimal256Builder) AppendValues(v []decimal256.Num, valid []bool)

AppendValues will append the values in the v slice. The valid slice determines which values in v are valid (not null). The valid slice must either be empty or be equal in length to v. If empty, all values in v are appended and considered valid.

func (*Decimal256Builder) Cap

func (b *Decimal256Builder) Cap() int

Cap returns the total number of elements that can be stored without allocating additional memory.

func (*Decimal256Builder) Len

func (b *Decimal256Builder) Len() int

Len returns the number of elements in the array builder.

func (*Decimal256Builder) NewArray

func (b *Decimal256Builder) NewArray() arrow.Array

NewArray creates a Decimal256 array from the memory buffers used by the builder and resets the Decimal256Builder so it can be used to build a new array.

func (*Decimal256Builder) NewDecimal256Array

func (b *Decimal256Builder) NewDecimal256Array() (a *Decimal256)

NewDecimal256Array creates a Decimal256 array from the memory buffers used by the builder and resets the Decimal256Builder so it can be used to build a new array.

func (*Decimal256Builder) NullN

func (b *Decimal256Builder) NullN() int

NullN returns the number of null values in the array builder.

func (*Decimal256Builder) Release

func (b *Decimal256Builder) Release()

Release decreases the reference count by 1. When the reference count goes to zero, the memory is freed.