Versions in this module Expand all Collapse all v0 v0.0.1 Aug 10, 2024 Changes in this version + const DefaultMaxChunkSize + const RoundDown + const RoundHalfDown + const RoundHalfToEven + const RoundHalfToOdd + const RoundHalfTowardsInfinity + const RoundHalfTowardsZero + const RoundHalfUp + const RoundTowardsInfinity + const RoundTowardsZero + const RoundUp + const SelectionDropNulls + const SelectionEmitNulls + const UnknownLength + var DefaultRoundOptions = RoundOptions + var DefaultRoundToMultipleOptions = RoundToMultipleOptions + var ErrEmpty = errors.New("cannot traverse empty field path") + var ErrIndexRange = errors.New("index out of range") + var ErrInvalid = errors.New("field ref invalid") + var ErrMultipleMatches = errors.New("multiple matches") + var ErrNoChildren = errors.New("trying to get child of type with no children") + var ErrNoMatch = errors.New("no match") + var GetAllocator = exec.GetAllocator + var WithAllocator = exec.WithAllocator + func CanCast(from, to arrow.DataType) bool + func CastArray(ctx context.Context, val arrow.Array, opts *CastOptions) (arrow.Array, error) + func CastFromExtension(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error + func CastList[SrcOffsetT, DestOffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error + func CastStruct(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error + func CastToType(ctx context.Context, val arrow.Array, toType arrow.DataType) (arrow.Array, error) + func DatumIsValue(d Datum) bool + func ExecSpanFromBatch(batch *ExecBatch) *exec.ExecSpan + func FilterArray(ctx context.Context, values, filter arrow.Array, options FilterOptions) (arrow.Array, error) + func FilterRecordBatch(ctx context.Context, batch arrow.Record, filter arrow.Array, ...) (arrow.Record, error) + func FilterTable(ctx context.Context, tbl arrow.Table, filter Datum, opts *FilterOptions) (arrow.Table, error) + func RegisterScalarArithmetic(reg FunctionRegistry) + func RegisterScalarBoolean(reg FunctionRegistry) + func RegisterScalarCast(reg FunctionRegistry) + func RegisterScalarComparisons(reg FunctionRegistry) + func RegisterVectorHash(reg FunctionRegistry) + func RegisterVectorRunEndFuncs(reg FunctionRegistry) + func RegisterVectorSelection(reg FunctionRegistry) + func RunEndDecodeArray(ctx context.Context, input arrow.Array) (arrow.Array, error) + func RunEndEncodeArray(ctx context.Context, opts RunEndEncodeOptions, input arrow.Array) (arrow.Array, error) + func SerializeExpr(expr Expression, mem memory.Allocator) (*memory.Buffer, error) + func SerializeOptions(opts FunctionOptions, mem memory.Allocator) (*memory.Buffer, error) + func SetExecCtx(ctx context.Context, e ExecCtx) context.Context + func TakeArray(ctx context.Context, values, indices arrow.Array) (arrow.Array, error) + func TakeArrayOpts(ctx context.Context, values, indices arrow.Array, opts TakeOptions) (arrow.Array, error) + func UniqueArray(ctx context.Context, values arrow.Array) (arrow.Array, error) + type ArithmeticOptions struct + NoCheckOverflow bool + func (ArithmeticOptions) TypeName() string + type Arity struct + IsVarArgs bool + NArgs int + func Binary() Arity + func Nullary() Arity + func Ternary() Arity + func Unary() Arity + func VarArgs(minArgs int) Arity + type ArrayDatum struct + Value arrow.ArrayData + func (ArrayDatum) Kind() DatumKind + func (d *ArrayDatum) Chunks() []arrow.Array + func (d *ArrayDatum) Equals(other Datum) bool + func (d *ArrayDatum) Len() int64 + func (d *ArrayDatum) MakeArray() arrow.Array + func (d *ArrayDatum) NullN() int64 + func (d *ArrayDatum) Release() + func (d *ArrayDatum) String() string + func (d *ArrayDatum) ToScalar() (scalar.Scalar, error) + func (d *ArrayDatum) Type() arrow.DataType + type ArrayLikeDatum interface + Chunks func() []arrow.Array + NullN func() int64 + Type func() arrow.DataType + type Call struct + func (c *Call) Equals(other Expression) bool + func (c *Call) FieldRef() *FieldRef + func (c *Call) Hash() uint64 + func (c *Call) IsBound() bool + func (c *Call) IsNullLiteral() bool + func (c *Call) IsSatisfiable() bool + func (c *Call) IsScalarExpr() bool + func (c *Call) Release() + func (c *Call) String() string + func (c *Call) Type() arrow.DataType + type CastOptions = kernels.CastOptions + func DefaultCastOptions(safe bool) *CastOptions + func NewCastOptions(dt arrow.DataType, safe bool) *CastOptions + func SafeCastOptions(dt arrow.DataType) *CastOptions + func UnsafeCastOptions(dt arrow.DataType) *CastOptions + type ChunkedDatum struct + Value *arrow.Chunked + func (ChunkedDatum) Kind() DatumKind + func (d *ChunkedDatum) Chunks() []arrow.Array + func (d *ChunkedDatum) Equals(other Datum) bool + func (d *ChunkedDatum) Len() int64 + func (d *ChunkedDatum) NullN() int64 + func (d *ChunkedDatum) Release() + func (d *ChunkedDatum) String() string + func (d *ChunkedDatum) Type() arrow.DataType + type Datum interface + Equals func(Datum) bool + Kind func() DatumKind + Len func() int64 + Release func() + func AbsoluteValue(ctx context.Context, opts ArithmeticOptions, input Datum) (Datum, error) + func Acos(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Add(ctx context.Context, opts ArithmeticOptions, left, right Datum) (Datum, error) + func Asin(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Atan(ctx context.Context, arg Datum) (Datum, error) + func Atan2(ctx context.Context, x, y Datum) (Datum, error) + func CallFunction(ctx context.Context, funcName string, opts FunctionOptions, args ...Datum) (Datum, error) + func CastDatum(ctx context.Context, val Datum, opts *CastOptions) (Datum, error) + func Cos(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Divide(ctx context.Context, opts ArithmeticOptions, left, right Datum) (Datum, error) + func Filter(ctx context.Context, values, filter Datum, options FilterOptions) (Datum, error) + func Ln(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Log10(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Log1p(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Log2(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Logb(ctx context.Context, opts ArithmeticOptions, x, base Datum) (Datum, error) + func Multiply(ctx context.Context, opts ArithmeticOptions, left, right Datum) (Datum, error) + func Negate(ctx context.Context, opts ArithmeticOptions, input Datum) (Datum, error) + func NewDatum(value interface{}) Datum + func NewDatumWithoutOwning(value interface{}) Datum + func Power(ctx context.Context, opts ArithmeticOptions, base, exp Datum) (Datum, error) + func Round(ctx context.Context, opts RoundOptions, arg Datum) (Datum, error) + func RoundToMultiple(ctx context.Context, opts RoundToMultipleOptions, arg Datum) (Datum, error) + func RunEndDecode(ctx context.Context, arg Datum) (Datum, error) + func RunEndEncode(ctx context.Context, opts RunEndEncodeOptions, arg Datum) (Datum, error) + func ShiftLeft(ctx context.Context, opts ArithmeticOptions, lhs, rhs Datum) (Datum, error) + func ShiftRight(ctx context.Context, opts ArithmeticOptions, lhs, rhs Datum) (Datum, error) + func Sign(ctx context.Context, input Datum) (Datum, error) + func Sin(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Subtract(ctx context.Context, opts ArithmeticOptions, left, right Datum) (Datum, error) + func Take(ctx context.Context, opts TakeOptions, values, indices Datum) (Datum, error) + func Tan(ctx context.Context, opts ArithmeticOptions, arg Datum) (Datum, error) + func Unique(ctx context.Context, values Datum) (Datum, error) + type DatumKind int + const KindArray + const KindChunked + const KindNone + const KindRecord + const KindScalar + const KindTable + func (i DatumKind) String() string + type EmptyDatum struct + func (EmptyDatum) Equals(other Datum) bool + func (EmptyDatum) Kind() DatumKind + func (EmptyDatum) Len() int64 + func (EmptyDatum) Release() + func (EmptyDatum) String() string + type ExecBatch struct + Len int64 + Values []Datum + func (e ExecBatch) NumValues() int + type ExecCtx struct + ChunkSize int64 + ExecChannelSize int + NumParallel int + PreallocContiguous bool + Registry FunctionRegistry + func DefaultExecCtx() ExecCtx + func GetExecCtx(ctx context.Context) ExecCtx + type Expression interface + Equals func(Expression) bool + FieldRef func() *FieldRef + Hash func() uint64 + IsBound func() bool + IsNullLiteral func() bool + IsSatisfiable func() bool + IsScalarExpr func() bool + Release func() + Type func() arrow.DataType + func And(lhs, rhs Expression, ops ...Expression) Expression + func Cast(ex Expression, dt arrow.DataType) Expression + func DeserializeExpr(mem memory.Allocator, buf *memory.Buffer) (Expression, error) + func Equal(lhs, rhs Expression) Expression + func Greater(lhs, rhs Expression) Expression + func GreaterEqual(lhs, rhs Expression) Expression + func IsNull(lhs Expression, nanIsNull bool) Expression + func IsValid(lhs Expression) Expression + func Less(lhs, rhs Expression) Expression + func LessEqual(lhs, rhs Expression) Expression + func NewCall(name string, args []Expression, opts FunctionOptions) Expression + func NewFieldRef(field string) Expression + func NewLiteral(arg interface{}) Expression + func NewRef(ref FieldRef) Expression + func Not(expr Expression) Expression + func NotEqual(lhs, rhs Expression) Expression + func NullLiteral(dt arrow.DataType) Expression + func Or(lhs, rhs Expression, ops ...Expression) Expression + func Project(values []Expression, names []string) Expression + type FieldPath []int + func (f FieldPath) Get(s *arrow.Schema) (*arrow.Field, error) + func (f FieldPath) GetColumn(batch arrow.Record) (arrow.Array, error) + func (f FieldPath) GetField(field arrow.Field) (*arrow.Field, error) + func (f FieldPath) GetFieldFromSlice(fields []arrow.Field) (*arrow.Field, error) + func (f FieldPath) GetFieldFromType(typ arrow.DataType) (*arrow.Field, error) + func (f FieldPath) String() string + type FieldRef struct + func FieldRefIndex(i int) FieldRef + func FieldRefList(elems ...interface{}) FieldRef + func FieldRefName(n string) FieldRef + func FieldRefPath(p FieldPath) FieldRef + func NewFieldRefFromDotPath(dotpath string) (out FieldRef, err error) + func (f *FieldRef) Equals(other FieldRef) bool + func (f *FieldRef) FieldPath() FieldPath + func (f *FieldRef) IsFieldPath() bool + func (f *FieldRef) IsName() bool + func (f *FieldRef) IsNested() bool + func (f *FieldRef) Name() string + func (f FieldRef) FindAll(fields []arrow.Field) []FieldPath + func (f FieldRef) FindAllField(field arrow.Field) []FieldPath + func (f FieldRef) FindOne(schema *arrow.Schema) (FieldPath, error) + func (f FieldRef) FindOneOrNone(schema *arrow.Schema) (FieldPath, error) + func (f FieldRef) FindOneOrNoneRecord(root arrow.Record) (FieldPath, error) + func (f FieldRef) GetAllColumns(root arrow.Record) ([]arrow.Array, error) + func (f FieldRef) GetOneColumnOrNone(root arrow.Record) (arrow.Array, error) + func (f FieldRef) GetOneField(schema *arrow.Schema) (*arrow.Field, error) + func (f FieldRef) GetOneOrNone(schema *arrow.Schema) (*arrow.Field, error) + func (f FieldRef) Hash(seed maphash.Seed) uint64 + func (f FieldRef) String() string + type FilterOptions = kernels.FilterOptions + func DefaultFilterOptions() *FilterOptions + type FuncKind int8 + const FuncHashAgg + const FuncMeta + const FuncScalar + const FuncScalarAgg + const FuncVector + func (i FuncKind) String() string + type Function interface + Arity func() Arity + DefaultOptions func() FunctionOptions + DispatchBest func(...arrow.DataType) (exec.Kernel, error) + DispatchExact func(...arrow.DataType) (exec.Kernel, error) + Doc func() FunctionDoc + Execute func(context.Context, FunctionOptions, ...Datum) (Datum, error) + Kind func() FuncKind + Name func() string + NumKernels func() int + Validate func() error + type FunctionDoc struct + ArgNames []string + Description string + OptionsRequired bool + OptionsType string + Summary string + var EmptyFuncDoc FunctionDoc + type FunctionOptions interface + TypeName func() string + type FunctionOptionsCloneable interface + Clone func() FunctionOptions + type FunctionOptionsEqual interface + Equals func(FunctionOptions) bool + type FunctionRegistry interface + AddAlias func(target, source string) bool + AddFunction func(fn Function, allowOverwrite bool) bool + CanAddAlias func(target, source string) bool + CanAddFunction func(fn Function, allowOverwrite bool) bool + GetFunction func(name string) (Function, bool) + GetFunctionNames func() []string + NumFunctions func() int + func GetFunctionRegistry() FunctionRegistry + func NewChildRegistry(parent FunctionRegistry) FunctionRegistry + func NewRegistry() FunctionRegistry + type KernelExecutor interface + CheckResultType func(out Datum) error + Clear func() + Execute func(context.Context, *ExecBatch, chan<- Datum) error + Init func(*exec.KernelCtx, exec.KernelInitArgs) error + WrapResults func(ctx context.Context, out <-chan Datum, chunkedArgs bool) Datum + func NewScalarExecutor() KernelExecutor + type Literal struct + Literal Datum + func (Literal) FieldRef() *FieldRef + func (l *Literal) Equals(other Expression) bool + func (l *Literal) Hash() uint64 + func (l *Literal) IsBound() bool + func (l *Literal) IsNullLiteral() bool + func (l *Literal) IsSatisfiable() bool + func (l *Literal) IsScalarExpr() bool + func (l *Literal) Release() + func (l *Literal) String() string + func (l *Literal) Type() arrow.DataType + type MakeStructOptions struct + FieldMetadata []*arrow.Metadata + FieldNames []string + FieldNullability []bool + func (MakeStructOptions) TypeName() string + type MetaFunction struct + func NewMetaFunction(name string, arity Arity, doc FunctionDoc, impl MetaFunctionImpl) *MetaFunction + func (MetaFunction) NumKernels() int + func (b *MetaFunction) Arity() Arity + func (b *MetaFunction) DefaultOptions() FunctionOptions + func (b *MetaFunction) Doc() FunctionDoc + func (b *MetaFunction) Kind() FuncKind + func (b *MetaFunction) Name() string + func (b *MetaFunction) Validate() error + func (m *MetaFunction) DispatchBest(...arrow.DataType) (exec.Kernel, error) + func (m *MetaFunction) DispatchExact(...arrow.DataType) (exec.Kernel, error) + func (m *MetaFunction) Execute(ctx context.Context, opts FunctionOptions, args ...Datum) (Datum, error) + type MetaFunctionImpl func(context.Context, FunctionOptions, ...Datum) (Datum, error) + type NullOptions struct + NanIsNull bool + func (NullOptions) TypeName() string + type NullSelectionBehavior = kernels.NullSelectionBehavior + type Parameter struct + func (Parameter) IsNullLiteral() bool + func (p *Parameter) Equals(other Expression) bool + func (p *Parameter) FieldRef() *FieldRef + func (p *Parameter) Hash() uint64 + func (p *Parameter) IsBound() bool + func (p *Parameter) IsSatisfiable() bool + func (p *Parameter) IsScalarExpr() bool + func (p *Parameter) Release() + func (p *Parameter) String() string + func (p *Parameter) Type() arrow.DataType + type RecordDatum struct + Value arrow.Record + func (RecordDatum) Kind() DatumKind + func (RecordDatum) String() string + func (r *RecordDatum) Equals(other Datum) bool + func (r *RecordDatum) Len() int64 + func (r *RecordDatum) Release() + func (r *RecordDatum) Schema() *arrow.Schema + type RoundMode = kernels.RoundMode + type RoundOptions = kernels.RoundOptions + type RoundToMultipleOptions = kernels.RoundToMultipleOptions + type RunEndEncodeOptions = kernels.RunEndEncodeState + type ScalarDatum struct + Value scalar.Scalar + func (ScalarDatum) Chunks() []arrow.Array + func (ScalarDatum) Kind() DatumKind + func (ScalarDatum) Len() int64 + func (d *ScalarDatum) Equals(other Datum) bool + func (d *ScalarDatum) NullN() int64 + func (d *ScalarDatum) Release() + func (d *ScalarDatum) String() string + func (d *ScalarDatum) ToScalar() (scalar.Scalar, error) + func (d *ScalarDatum) Type() arrow.DataType + type ScalarFunction struct + func NewScalarFunction(name string, arity Arity, doc FunctionDoc) *ScalarFunction + func (fi *ScalarFunction) Kernels() []*KT + func (fi *ScalarFunction) NumKernels() int + func (s *ScalarFunction) AddKernel(k exec.ScalarKernel) error + func (s *ScalarFunction) AddNewKernel(inTypes []exec.InputType, outType exec.OutputType, execFn exec.ArrayKernelExec, ...) error + func (s *ScalarFunction) DispatchBest(vals ...arrow.DataType) (exec.Kernel, error) + func (s *ScalarFunction) DispatchExact(vals ...arrow.DataType) (exec.Kernel, error) + func (s *ScalarFunction) Execute(ctx context.Context, opts FunctionOptions, args ...Datum) (Datum, error) + func (s *ScalarFunction) SetDefaultOptions(opts FunctionOptions) + type SetLookupOptions struct + SkipNulls bool + ValueSet Datum + func (SetLookupOptions) TypeName() string + func (s *SetLookupOptions) Equals(other FunctionOptions) bool + func (s *SetLookupOptions) FromStructScalar(sc *scalar.Struct) error + func (s *SetLookupOptions) Release() + type StrptimeOptions struct + Format string + Unit arrow.TimeUnit + func (StrptimeOptions) TypeName() string + type TableDatum struct + Value arrow.Table + func (TableDatum) Kind() DatumKind + func (TableDatum) String() string + func (d *TableDatum) Equals(other Datum) bool + func (d *TableDatum) Len() int64 + func (d *TableDatum) Release() + func (d *TableDatum) Schema() *arrow.Schema + type TableLikeDatum interface + Schema func() *arrow.Schema + type TakeOptions = kernels.TakeOptions + func DefaultTakeOptions() *TakeOptions + type VectorFunction struct + func NewVectorFunction(name string, arity Arity, doc FunctionDoc) *VectorFunction + func (f *VectorFunction) AddKernel(kernel exec.VectorKernel) error + func (f *VectorFunction) AddNewKernel(inTypes []exec.InputType, outType exec.OutputType, execFn exec.ArrayKernelExec, ...) error + func (f *VectorFunction) DispatchBest(vals ...arrow.DataType) (exec.Kernel, error) + func (f *VectorFunction) DispatchExact(vals ...arrow.DataType) (exec.Kernel, error) + func (f *VectorFunction) Execute(ctx context.Context, opts FunctionOptions, args ...Datum) (Datum, error) + func (f *VectorFunction) SetDefaultOptions(opts FunctionOptions) + func (fi *VectorFunction) Kernels() []*KT + func (fi *VectorFunction) NumKernels() int