package builder
Import Path
github.com/polarsignals/frostdb/pqarrow/builder (on go.dev)
Dependency Relation
imports 10 packages, and imported by 4 packages
Involved Source Files
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
optbuilders.go
recordbuilder.go
utils.go
Package-Level Type Names (total 10)
ColumnBuilder is a subset of the array.Builder interface implemented by the
optimized builders in this file.
( ColumnBuilder) AppendNull()
( ColumnBuilder) Len() int
( ColumnBuilder) NewArray() arrow.Array
( ColumnBuilder) Release()
( ColumnBuilder) Reserve(int)
( ColumnBuilder) Retain()
*ListBuilder
*OptBinaryBuilder
*OptBooleanBuilder
*OptFloat64Builder
*OptInt32Builder
*OptInt64Builder
OptimizedBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/array.BinaryBuilder
*github.com/apache/arrow-go/v18/arrow/array.BinaryDictionaryBuilder
github.com/apache/arrow-go/v18/arrow/array.BinaryLikeBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/array.BinaryViewBuilder
*github.com/apache/arrow-go/v18/arrow/array.BooleanBuilder
github.com/apache/arrow-go/v18/arrow/array.Builder (interface)
*github.com/apache/arrow-go/v18/arrow/array.Date32Builder
*github.com/apache/arrow-go/v18/arrow/array.Date64Builder
*github.com/apache/arrow-go/v18/arrow/array.DayTimeIntervalBuilder
github.com/apache/arrow-go/v18/arrow/array.Decimal128Builder
github.com/apache/arrow-go/v18/arrow/array.Decimal256Builder
*github.com/apache/arrow-go/v18/arrow/array.DenseUnionBuilder
github.com/apache/arrow-go/v18/arrow/array.DictionaryBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/array.DurationBuilder
*github.com/apache/arrow-go/v18/arrow/array.ExtensionBuilder
*github.com/apache/arrow-go/v18/arrow/array.FixedSizeBinaryBuilder
*github.com/apache/arrow-go/v18/arrow/array.FixedSizeBinaryDictionaryBuilder
*github.com/apache/arrow-go/v18/arrow/array.FixedSizeListBuilder
*github.com/apache/arrow-go/v18/arrow/array.Float16Builder
*github.com/apache/arrow-go/v18/arrow/array.Float32Builder
*github.com/apache/arrow-go/v18/arrow/array.Float64Builder
github.com/apache/arrow-go/v18/arrow/array.IndexBuilder
*github.com/apache/arrow-go/v18/arrow/array.Int16Builder
*github.com/apache/arrow-go/v18/arrow/array.Int32Builder
*github.com/apache/arrow-go/v18/arrow/array.Int64Builder
*github.com/apache/arrow-go/v18/arrow/array.Int8Builder
*github.com/apache/arrow-go/v18/arrow/array.LargeListBuilder
*github.com/apache/arrow-go/v18/arrow/array.LargeListViewBuilder
*github.com/apache/arrow-go/v18/arrow/array.LargeStringBuilder
*github.com/apache/arrow-go/v18/arrow/array.ListBuilder
github.com/apache/arrow-go/v18/arrow/array.ListLikeBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/array.ListViewBuilder
*github.com/apache/arrow-go/v18/arrow/array.MapBuilder
*github.com/apache/arrow-go/v18/arrow/array.MonthDayNanoIntervalBuilder
*github.com/apache/arrow-go/v18/arrow/array.MonthIntervalBuilder
*github.com/apache/arrow-go/v18/arrow/array.NullBuilder
*github.com/apache/arrow-go/v18/arrow/array.NullDictionaryBuilder
*github.com/apache/arrow-go/v18/arrow/array.RunEndEncodedBuilder
*github.com/apache/arrow-go/v18/arrow/array.SparseUnionBuilder
*github.com/apache/arrow-go/v18/arrow/array.StringBuilder
github.com/apache/arrow-go/v18/arrow/array.StringLikeBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/array.StringViewBuilder
*github.com/apache/arrow-go/v18/arrow/array.StructBuilder
*github.com/apache/arrow-go/v18/arrow/array.Time32Builder
*github.com/apache/arrow-go/v18/arrow/array.Time64Builder
*github.com/apache/arrow-go/v18/arrow/array.TimestampBuilder
*github.com/apache/arrow-go/v18/arrow/array.Uint16Builder
*github.com/apache/arrow-go/v18/arrow/array.Uint32Builder
*github.com/apache/arrow-go/v18/arrow/array.Uint64Builder
*github.com/apache/arrow-go/v18/arrow/array.Uint8Builder
github.com/apache/arrow-go/v18/arrow/array.UnionBuilder (interface)
github.com/apache/arrow-go/v18/arrow/array.VarLenListLikeBuilder (interface)
github.com/apache/arrow-go/v18/arrow/extensions.Bool8Builder
github.com/apache/arrow-go/v18/arrow/extensions.UUIDBuilder
github.com/apache/arrow-go/v18/arrow/extensions.VariantBuilder
ColumnBuilder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewBuilder(mem memory.Allocator, t arrow.DataType) ColumnBuilder
func (*ListBuilder).ValueBuilder() ColumnBuilder
func (*RecordBuilder).Field(i int) ColumnBuilder
func (*RecordBuilder).Fields() []ColumnBuilder
func github.com/polarsignals/frostdb/pqarrow.(*ParquetConverter).Fields() []ColumnBuilder
func AppendArray(cb ColumnBuilder, arr arrow.Array) error
func AppendGoValue(cb ColumnBuilder, v any) error
func AppendValue(cb ColumnBuilder, arr arrow.Array, i int) error
func RollbackPrevious(cb ColumnBuilder) error
func github.com/polarsignals/frostdb/pqarrow/writer.NewBinaryValueWriter(b ColumnBuilder, _ int) writer.ValueWriter
func github.com/polarsignals/frostdb/pqarrow/writer.NewBooleanValueWriter(b ColumnBuilder, numValues int) writer.ValueWriter
func github.com/polarsignals/frostdb/pqarrow/writer.NewDictionaryValueWriter(b ColumnBuilder, _ int) writer.ValueWriter
func github.com/polarsignals/frostdb/pqarrow/writer.NewFloat64ValueWriter(b ColumnBuilder, numValues int) writer.ValueWriter
func github.com/polarsignals/frostdb/pqarrow/writer.NewInt64ValueWriter(b ColumnBuilder, _ int) writer.ValueWriter
func github.com/polarsignals/frostdb/pqarrow/writer.NewMapWriter(b ColumnBuilder, _ int) writer.ValueWriter
func github.com/polarsignals/frostdb/pqarrow/writer.NewUint64ValueWriter(b ColumnBuilder, numValues int) writer.ValueWriter
ListBuilder is a wrapper over an array.ListBuilder that uses ColumnBuilder as a values buffer.
(*ListBuilder) Append(v bool)
(*ListBuilder) AppendNull()
(*ListBuilder) AppendValues(offsets []int32, valid []bool)
(*ListBuilder) Len() int
NewArray creates a List array from the memory buffers used by the builder and resets the ListBuilder
so it can be used to build a new array.
NewListArray creates a List array from the memory buffers used by the builder and resets the ListBuilder
so it can be used to build a new array.
Release decreases the reference count by 1.
When the reference count goes to zero, the memory is freed.
Reserve ensures there is enough space for appending n elements
by checking the capacity and calling Resize if necessary.
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.
(*ListBuilder) Retain()
(*ListBuilder) ValueBuilder() ColumnBuilder
*ListBuilder : ColumnBuilder
*ListBuilder : ListLikeBuilder
*ListBuilder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewListBuilder(mem memory.Allocator, etype arrow.DataType) *ListBuilder
( ListLikeBuilder) Append(bool)
*ListBuilder
*github.com/apache/arrow-go/v18/arrow/array.BooleanBuilder
*github.com/apache/arrow-go/v18/arrow/array.FixedSizeListBuilder
*github.com/apache/arrow-go/v18/arrow/array.LargeListBuilder
*github.com/apache/arrow-go/v18/arrow/array.LargeListViewBuilder
*github.com/apache/arrow-go/v18/arrow/array.ListBuilder
github.com/apache/arrow-go/v18/arrow/array.ListLikeBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/array.ListViewBuilder
*github.com/apache/arrow-go/v18/arrow/array.MapBuilder
*github.com/apache/arrow-go/v18/arrow/array.StructBuilder
github.com/apache/arrow-go/v18/arrow/array.VarLenListLikeBuilder (interface)
*github.com/apache/arrow-go/v18/arrow/extensions.Bool8Builder
OptBinaryBuilder is an optimized array.BinaryBuilder.
(*OptBinaryBuilder) Append(v []byte) error
AppendData appends a flat slice of bytes to the builder, with an accompanying
slice of offsets. This data is considered to be non-null.
AppendEmptyValue adds a new empty byte slice to the array being built.
AppendNull adds a new null value to the array being built. This is slow,
don't use it.
AppendNulls appends n null values to the array being built. This is specific
to distinct optimizations in FrostDB.
AppendParquetValues appends the given parquet values to the builder. The
values may be null, but if it is known upfront that none of the values are
null, AppendData offers a more efficient way of appending values.
(*OptBinaryBuilder) IsNull(n int) bool
(*OptBinaryBuilder) IsValid(n int) bool
Len returns the number of elements in the array builder.
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.
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.
RepeatLastValue is specific to distinct optimizations in FrostDB.
(*OptBinaryBuilder) Reserve(int)
ResetToLength is specific to distinct optimizations in FrostDB.
(*OptBinaryBuilder) Retain()
SetNull is setting the value at the index i to null.
(*OptBinaryBuilder) Value(i int) []byte
*OptBinaryBuilder : ColumnBuilder
*OptBinaryBuilder : OptimizedBuilder
*OptBinaryBuilder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewOptBinaryBuilder(dtype arrow.BinaryDataType) *OptBinaryBuilder
(*OptBooleanBuilder) Append(data []byte, valid int)
(*OptBooleanBuilder) AppendData(_ []byte)
AppendEmptyValue adds a new zero value (false) to the array being built.
(*OptBooleanBuilder) AppendNull()
(*OptBooleanBuilder) AppendNulls(n int)
(*OptBooleanBuilder) AppendParquetValues(values []parquet.Value)
(*OptBooleanBuilder) AppendSingle(v bool)
(*OptBooleanBuilder) IsNull(n int) bool
(*OptBooleanBuilder) IsValid(n int) bool
Len returns the number of elements in the array builder.
(*OptBooleanBuilder) NewArray() arrow.Array
(*OptBooleanBuilder) Release()
(*OptBooleanBuilder) RepeatLastValue(n int) error
(*OptBooleanBuilder) Reserve(int)
ResetToLength is specific to distinct optimizations in FrostDB.
(*OptBooleanBuilder) Retain()
(*OptBooleanBuilder) Set(i int, v bool)
SetNull is setting the value at the index i to null.
(*OptBooleanBuilder) Value(i int) bool
*OptBooleanBuilder : ColumnBuilder
*OptBooleanBuilder : OptimizedBuilder
*OptBooleanBuilder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewOptBooleanBuilder(dtype arrow.DataType) *OptBooleanBuilder
(*OptFloat64Builder) Add(i int, v float64)
(*OptFloat64Builder) Append(v float64)
AppendData appends a slice of float64s to the builder.
This data is considered to be non-null.
AppendEmptyValue adds a new zero value (0.0) to the array being built.
(*OptFloat64Builder) AppendNull()
(*OptFloat64Builder) AppendNulls(n int)
(*OptFloat64Builder) AppendParquetValues(values []parquet.Value)
(*OptFloat64Builder) IsNull(n int) bool
(*OptFloat64Builder) IsValid(n int) bool
Len returns the number of elements in the array builder.
(*OptFloat64Builder) NewArray() arrow.Array
(*OptFloat64Builder) Release()
(*OptFloat64Builder) RepeatLastValue(n int) error
(*OptFloat64Builder) Reserve(int)
ResetToLength is specific to distinct optimizations in FrostDB.
(*OptFloat64Builder) Retain()
(*OptFloat64Builder) Set(i int, v float64)
SetNull is setting the value at the index i to null.
Value returns the ith value of the builder.
*OptFloat64Builder : ColumnBuilder
*OptFloat64Builder : OptimizedBuilder
*OptFloat64Builder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewOptFloat64Builder(dtype arrow.DataType) *OptFloat64Builder
OptimizedBuilder is a set of FrostDB specific builder methods.
( OptimizedBuilder) AppendNull()
( OptimizedBuilder) AppendNulls(int)
( OptimizedBuilder) IsNull(i int) bool
( OptimizedBuilder) IsValid(i int) bool
( OptimizedBuilder) Len() int
( OptimizedBuilder) NewArray() arrow.Array
( OptimizedBuilder) Release()
( OptimizedBuilder) RepeatLastValue(int) error
( OptimizedBuilder) Reserve(int)
( OptimizedBuilder) ResetToLength(int)
( OptimizedBuilder) Retain()
( OptimizedBuilder) SetNull(i int)
*OptBinaryBuilder
*OptBooleanBuilder
*OptFloat64Builder
*OptInt32Builder
*OptInt64Builder
OptimizedBuilder : ColumnBuilder
OptimizedBuilder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
(*OptInt32Builder) Add(i int, v int32)
(*OptInt32Builder) Append(v int32)
AppendData appends a slice of int32s to the builder. This data is considered
to be non-null.
AppendEmptyValue adds a new zero value (0) to the array being built.
(*OptInt32Builder) AppendNull()
(*OptInt32Builder) AppendNulls(n int)
(*OptInt32Builder) AppendParquetValues(values []parquet.Value)
(*OptInt32Builder) IsNull(n int) bool
(*OptInt32Builder) IsValid(n int) bool
Len returns the number of elements in the array builder.
(*OptInt32Builder) NewArray() arrow.Array
(*OptInt32Builder) Release()
(*OptInt32Builder) RepeatLastValue(n int) error
(*OptInt32Builder) Reserve(n int)
ResetToLength is specific to distinct optimizations in FrostDB.
(*OptInt32Builder) Retain()
Set sets value v at index i. THis will panic if i is out of bounds. Use this
after calling Reserve.
SetNull is setting the value at the index i to null.
Swap swaps values at i and j index.
(*OptInt32Builder) Value(i int) int32
*OptInt32Builder : ColumnBuilder
*OptInt32Builder : OptimizedBuilder
*OptInt32Builder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewOptInt32Builder(dtype arrow.DataType) *OptInt32Builder
(*OptInt64Builder) Add(i int, v int64)
(*OptInt64Builder) Append(v int64)
AppendData appends a slice of int64s to the builder. This data is considered
to be non-null.
AppendEmptyValue adds a new zero value (0) to the array being built.
(*OptInt64Builder) AppendNull()
(*OptInt64Builder) AppendNulls(n int)
(*OptInt64Builder) AppendParquetValues(values []parquet.Value)
(*OptInt64Builder) IsNull(n int) bool
(*OptInt64Builder) IsValid(n int) bool
Len returns the number of elements in the array builder.
(*OptInt64Builder) NewArray() arrow.Array
(*OptInt64Builder) Release()
(*OptInt64Builder) RepeatLastValue(n int) error
(*OptInt64Builder) Reserve(int)
ResetToLength is specific to distinct optimizations in FrostDB.
(*OptInt64Builder) Retain()
(*OptInt64Builder) Set(i int, v int64)
SetNull is setting the value at the index i to null.
Value returns the ith value of the builder.
*OptInt64Builder : ColumnBuilder
*OptInt64Builder : OptimizedBuilder
*OptInt64Builder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewOptInt64Builder(dtype arrow.DataType) *OptInt64Builder
RecordBuilder eases the process of building a Record, iteratively, from
a known Schema.
ExpandSchema expands the record builder schema by adding new fields.
(*RecordBuilder) Field(i int) ColumnBuilder
(*RecordBuilder) Fields() []ColumnBuilder
NewRecord creates a new record from the memory buffers and resets the
RecordBuilder so it can be used to build a new record.
The returned Record must be Release()'d after use.
NewRecord panics if the fields' builder do not have the same length.
Release decreases the reference count by 1.
(*RecordBuilder) Reserve(size int)
Reset will call ResetFull on any dictionary builders to prevent memo tables from growing unbounded.
Retain increases the reference count by 1.
Retain may be called simultaneously from multiple goroutines.
(*RecordBuilder) Schema() *arrow.Schema
*RecordBuilder : github.com/apache/arrow-go/v18/arrow/scalar.Releasable
func NewRecordBuilder(mem memory.Allocator, schema *arrow.Schema) *RecordBuilder
Package-Level Functions (total 12)
TODO(asubiotto): This function doesn't handle NULLs in the case of optimized
builders.
func AppendGoValue(cb ColumnBuilder, v any) error func AppendValue(cb ColumnBuilder, arr arrow.Array, i int) error func NewBuilder(mem memory.Allocator, t arrow.DataType) ColumnBuilder func NewListBuilder(mem memory.Allocator, etype arrow.DataType) *ListBuilder func NewOptBinaryBuilder(dtype arrow.BinaryDataType) *OptBinaryBuilder func NewOptBooleanBuilder(dtype arrow.DataType) *OptBooleanBuilder func NewOptFloat64Builder(dtype arrow.DataType) *OptFloat64Builder func NewOptInt32Builder(dtype arrow.DataType) *OptInt32Builder func NewOptInt64Builder(dtype arrow.DataType) *OptInt64Builder
NewRecordBuilder returns a builder, using the provided memory allocator and a schema.
func RollbackPrevious(cb ColumnBuilder) error
Package-Level Variables (only one)
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |