package exec

Import Path
	github.com/apache/arrow-go/v18/arrow/compute/exec (on go.dev)

Dependency Relation
	imports 15 packages, and imported by 2 packages


Package-Level Type Names (total 31)
/* sort by: | */
Type Parameters: T: arrayTypes ( ArrayIter[T]) Next() T func NewBoolIter(arr *ArraySpan) ArrayIter[bool] func NewFSBIter(arr *ArraySpan) ArrayIter[[]byte] func NewPrimitiveIter[T](arr *ArraySpan) ArrayIter[T] func NewVarBinaryIter[OffsetT](arr *ArraySpan) ArrayIter[[]byte]
ArrayKernelExec is an alias definition for a kernel's execution function. This is used for both stateless and stateful kernels. If a kernel depends on some execution state, it can be accessed from the KernelCtx object, which also contains the context.Context object which can be used for shortcircuiting by checking context.Done / context.Err. This allows kernels to control handling timeouts or cancellation of computation.
ArraySpan is a light-weight, non-owning version of arrow.ArrayData for more efficient handling with computation and engines. We use explicit go Arrays to define the buffers and some scratch space for easily populating and shifting around pointers to memory without having to worry about and deal with retain/release during calculations. Buffers [3]BufferSpan Children []ArraySpan Len int64 Nulls int64 Offset int64 Scratch is a holding spot for things such as offsets or union type codes when converting from scalars Type arrow.DataType Dictionary returns a pointer to the array span for the dictionary which we will always place as the first (and only) child if it exists. FillFromScalar populates this ArraySpan as if it were a 1 length array with the single value equal to the passed in Scalar. GetBuffer returns the buffer for the requested index. If this buffer is owned by another array/arrayspan the Owning buffer is returned, otherwise if this slice has no owning buffer, we call NewBufferBytes to wrap it as a memory.Buffer. Can also return nil if there is no buffer in this index. MakeArray is a convenience function for calling array.MakeFromData(a.MakeData()) MakeData generates an arrow.ArrayData object for this ArraySpan, properly updating the buffer ref count if necessary. (*ArraySpan) MayHaveNulls() bool NumBuffers returns the number of expected buffers for this type if an error is encountered, call Release on a preallocated span to ensure it releases any self-allocated buffers, it will not call release on buffers it doesn't own (SelfAlloc != true) (*ArraySpan) SetDictionary(span *ArraySpan) SetMembers populates this ArraySpan from the given ArrayData object. As this is a non-owning reference, the ArrayData object must not be fully released while this ArraySpan is in use, otherwise any buffers referenced will be released too SetSlice updates the offset and length of this ArraySpan to refer to a specific slice of the underlying buffers. TakeOwnership is like SetMembers only this takes ownership of the buffers by calling Retain on them so that the passed in ArrayData can be released without negatively affecting this ArraySpan UpdateNullCount will count the bits in the null bitmap and update the number of nulls if the current null count is unknown, otherwise it just returns the value of a.Nulls func (*ArraySpan).Dictionary() *ArraySpan func FillZeroLength(dt arrow.DataType, span *ArraySpan) func GetSpanOffsets[T](span *ArraySpan, i int) []T func GetSpanValues[T](span *ArraySpan, i int) []T func NewBoolIter(arr *ArraySpan) ArrayIter[bool] func NewFSBIter(arr *ArraySpan) ArrayIter[[]byte] func NewPrimitiveIter[T](arr *ArraySpan) ArrayIter[T] func NewVarBinaryIter[OffsetT](arr *ArraySpan) ArrayIter[[]byte] func (*ArraySpan).SetDictionary(span *ArraySpan) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.DispatchIsIn(state kernels.lookupState, in *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetTakeIndices(mem memory.Allocator, filter *ArraySpan, nullSelect kernels.NullSelectionBehavior) (arrow.ArrayData, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ShiftTime[InT, OutT](ctx *KernelCtx, op arrow.TimestampConvertOp, factor int64, input, output *ArraySpan) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndNotOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndNotOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndNotOpKernel.CallScalarRight(ctx *KernelCtx, left *ArraySpan, right scalar.Scalar, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.HashState.Append(*KernelCtx, *ArraySpan) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndNotOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndNotOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndNotOpKernel.CallScalarRight(ctx *KernelCtx, left *ArraySpan, right scalar.Scalar, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneOrOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneOrOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OrOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OrOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.(*SetLookupState)[T].AddArrayValueSet(data *ArraySpan, startIdx int64) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.Call(*KernelCtx, *ArraySpan, *ArraySpan, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.Call(*KernelCtx, *ArraySpan, *ArraySpan, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.CallScalarLeft(*KernelCtx, scalar.Scalar, *ArraySpan, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.CallScalarRight(*KernelCtx, *ArraySpan, scalar.Scalar, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.XorOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.XorOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error
Rdr *bitutil.BitmapReader (*BoolIter) Next() (out bool) *BoolIter : ArrayIter[bool]
BufferSpan is a lightweight Buffer holder for ArraySpans that does not take ownership of the underlying memory.Buffer at all or could be used to reference raw byte slices instead. Buf should be the byte slice representing this buffer, if this is nil then this bufferspan should be considered empty. Owner should point to an underlying parent memory.Buffer if this memory is owned by a different, existing, buffer. Retain is not called on this buffer, so it must not be released as long as this BufferSpan refers to it. SelfAlloc tracks whether or not this bufferspan is the only owner of the Owning memory.Buffer. This happens when preallocating memory or if a kernel allocates it's own buffer for a result. In these cases, we have to know so we can properly maintain the refcount if this is later turned into an ArrayData object. SetBuffer sets the given buffer into this BufferSpan and marks SelfAlloc as false. This should be called when setting a buffer that is externally owned/created. WrapBuffer wraps this bufferspan around a buffer and marks SelfAlloc as true. This should be called when setting a buffer that was allocated as part of an execution rather than just re-using an existing buffer from an input array.
ChunkedExec is the signature for executing a stateful vector kernel against a ChunkedArray input. It is optional
(*ChunkResolver) Resolve(idx int64) (chunk, index int64) func NewChunkResolver(chunks []arrow.Array) *ChunkResolver
ExecResult is the result of a kernel execution and should be populated by the execution functions and/or a kernel. For now we're just going to alias an ArraySpan.
ExecSpan represents a slice of inputs and is used to provide slices of input values to iterate over. Len is the length of the span (all elements in Values should either be scalar or an array with a length + offset of at least Len). Len int64 Values []ExecValue func github.com/apache/arrow-go/v18/arrow/compute.ExecSpanFromBatch(batch *compute.ExecBatch) *ExecSpan func PromoteExecSpanScalars(span ExecSpan) func NonAggKernel.Exec(*KernelCtx, *ExecSpan, *ExecResult) error func (*ScalarKernel).Exec(ctx *KernelCtx, sp *ExecSpan, out *ExecResult) error func (*VectorKernel).Exec(ctx *KernelCtx, sp *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.CastFromExtension(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.CastList[SrcOffsetT, DestOffsetT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.CastStruct(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastBinaryToBinary[InOffsetsT, OutOffsetsT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimal128ToInteger[T](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimal256ToInteger[T](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimalToDecimal(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimalToFloat16(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimalToFloating[OutT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloat32ToDecimal(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloat64ToDecimal(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloatingToFloating(_ *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloatingToInteger(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFromNull(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFsbToBinary[OffsetsT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFsbToFsb(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastIntegerToDecimal[OutT, Arg0](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastIntegerToFloating(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastIntToInt(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.DenseUnionImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.FilterBinary(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.FSBImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.FSLImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ListImpl[OffsetT](ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NotExecKernel(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullFilter(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullTake(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullToNullExec(_ *KernelCtx, _ *ExecSpan, _ *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OutputAllNull(_ *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.PrimitiveFilter(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.PrimitiveTake(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinary[K](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleTemporalCast[I, O](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.StringToTimestamp[OffsetT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.StructImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToDate32(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToDate64(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToTime32(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToTime64(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.VarBinaryImpl[OffsetT](ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ZeroCopyCastExec(_ *KernelCtx, batch *ExecSpan, out *ExecResult) error
ExecValue represents a single input to an execution which could be either an Array (ArraySpan) or a Scalar value Array ArraySpan Scalar scalar.Scalar (*ExecValue) IsArray() bool (*ExecValue) IsScalar() bool (*ExecValue) Type() arrow.DataType
FinalizeFunc is an optional finalizer function for any postprocessing that may need to be done on data before returning it
Data []byte Pos int64 Width int (*FSBIter) Next() []byte *FSBIter : ArrayIter[[]byte]
InputKind is an enum representing the type of Input matching that will be done. Either accepting any type, an exact specific type or using a TypeMatcher. const InputAny const InputExact const InputUseMatcher
InputType is used for type checking arguments passed to a kernel and stored within a KernelSignature. The type-checking rule can be supplied either with an exact DataType instance or a custom TypeMatcher. Kind InputKind Matcher TypeMatcher Type arrow.DataType (*InputType) Equals(other *InputType) bool ( InputType) Hash() uint64 ( InputType) MatchID() arrow.Type ( InputType) Matches(dt arrow.DataType) bool ( InputType) String() string InputType : expvar.Var InputType : fmt.Stringer func NewExactInput(dt arrow.DataType) InputType func NewIDInput(id arrow.Type) InputType func NewMatchedInput(match TypeMatcher) InputType func NewScalarKernel(in []InputType, out OutputType, exec ArrayKernelExec, init KernelInitFn) ScalarKernel func NewVectorKernel(inTypes []InputType, outType OutputType, exec ArrayKernelExec, init KernelInitFn) VectorKernel func (*InputType).Equals(other *InputType) bool func github.com/apache/arrow-go/v18/arrow/compute.(*ScalarFunction).AddNewKernel(inTypes []InputType, outType OutputType, execFn ArrayKernelExec, init KernelInitFn) error func github.com/apache/arrow-go/v18/arrow/compute.(*VectorFunction).AddNewKernel(inTypes []InputType, outType OutputType, execFn ArrayKernelExec, init KernelInitFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCompareKernel(ty InputType, cmpType arrow.Type, op kernels.CompareOperator) ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetZeroCastKernel(inID arrow.Type, inType InputType, out OutputType) ScalarKernel
Kernel defines the minimum interface required for the basic execution kernel. It will grow as the implementation requires. ( Kernel) GetInitFn() KernelInitFn ( Kernel) GetSig() *KernelSignature NonAggKernel (interface) ScalarKernel VectorKernel func github.com/apache/arrow-go/v18/arrow/compute.Function.DispatchBest(...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.Function.DispatchExact(...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.(*MetaFunction).DispatchBest(...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.(*MetaFunction).DispatchExact(...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.(*ScalarFunction).DispatchBest(vals ...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.(*ScalarFunction).DispatchExact(vals ...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.(*VectorFunction).DispatchBest(vals ...arrow.DataType) (Kernel, error) func github.com/apache/arrow-go/v18/arrow/compute.(*VectorFunction).DispatchExact(vals ...arrow.DataType) (Kernel, error)
KernelCtx is a small struct holding the context for a kernel execution consisting of a pointer to the kernel, initialized state (if needed) and the context for this execution. Ctx context.Context Kernel Kernel State KernelState (*KernelCtx) Allocate(bufsize int) *memory.Buffer (*KernelCtx) AllocateBitmap(nbits int64) *memory.Buffer func OptionsInit[T](_ *KernelCtx, args KernelInitArgs) (KernelState, error) func NonAggKernel.Exec(*KernelCtx, *ExecSpan, *ExecResult) error func OutputType.Resolve(ctx *KernelCtx, types []arrow.DataType) (arrow.DataType, error) func (*ScalarKernel).Exec(ctx *KernelCtx, sp *ExecSpan, out *ExecResult) error func (*VectorKernel).Exec(ctx *KernelCtx, sp *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.CastFromExtension(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.CastList[SrcOffsetT, DestOffsetT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.CastStruct(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute.KernelExecutor.Init(*KernelCtx, KernelInitArgs) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastBinaryToBinary[InOffsetsT, OutOffsetsT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimal128ToInteger[T](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimal256ToInteger[T](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimalToDecimal(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimalToFloat16(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastDecimalToFloating[OutT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloat32ToDecimal(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloat64ToDecimal(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloatingToFloating(_ *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFloatingToInteger(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFromNull(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFsbToBinary[OffsetsT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastFsbToFsb(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastIntegerToDecimal[OutT, Arg0](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastIntegerToFloating(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CastIntToInt(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ChunkedPrimitiveTake(ctx *KernelCtx, batch []*arrow.Chunked, out *ExecResult) ([]*ExecResult, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.DenseUnionImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.FilterBinary(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.FSBImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.FSLImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.InitRoundState(_ *KernelCtx, args KernelInitArgs) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.InitRoundToMultipleState(_ *KernelCtx, args KernelInitArgs) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ListImpl[OffsetT](ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NotExecKernel(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullFilter(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullTake(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullToNullExec(_ *KernelCtx, _ *ExecSpan, _ *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OutputAllNull(_ *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.PrimitiveFilter(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.PrimitiveTake(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ResolveOutputFromOptions(ctx *KernelCtx, _ []arrow.DataType) (arrow.DataType, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ShiftTime[InT, OutT](ctx *KernelCtx, op arrow.TimestampConvertOp, factor int64, input, output *ArraySpan) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinary[K](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleTemporalCast[I, O](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.StringToTimestamp[OffsetT](ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.StructImpl(ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToDate32(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToDate64(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToTime32(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.TimestampToTime64(ctx *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.VarBinaryImpl[OffsetT](ctx *KernelCtx, batch *ExecSpan, outputLength int64, out *ExecResult, fn kernels.selectionOutputFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.ZeroCopyCastExec(_ *KernelCtx, batch *ExecSpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndNotOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndNotOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndNotOpKernel.CallScalarRight(ctx *KernelCtx, left *ArraySpan, right scalar.Scalar, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.AndOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.HashState.Append(*KernelCtx, *ArraySpan) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndNotOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndNotOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndNotOpKernel.CallScalarRight(ctx *KernelCtx, left *ArraySpan, right scalar.Scalar, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneAndOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneOrOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.KleeneOrOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OrOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OrOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.Call(*KernelCtx, *ArraySpan, *ArraySpan, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.CallScalarLeft(*KernelCtx, scalar.Scalar, *ArraySpan, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.SimpleBinaryKernel.CallScalarRight(*KernelCtx, *ArraySpan, scalar.Scalar, *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.XorOpKernel.Call(ctx *KernelCtx, left, right *ArraySpan, out *ExecResult) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.XorOpKernel.CallScalarLeft(ctx *KernelCtx, left scalar.Scalar, right *ArraySpan, out *ExecResult) error
KernelInitArgs are the arguments required to initialize an Kernel's state using the input types and any options. Inputs []arrow.DataType Kernel Kernel Options are opaque and specific to the Kernel being initialized, may be nil if the kernel doesn't require options. func OptionsInit[T](_ *KernelCtx, args KernelInitArgs) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute.KernelExecutor.Init(*KernelCtx, KernelInitArgs) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.InitRoundState(_ *KernelCtx, args KernelInitArgs) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.InitRoundToMultipleState(_ *KernelCtx, args KernelInitArgs) (KernelState, error)
KernelInitFn is any function that receives a KernelCtx and initialization arguments and returns the initialized state or an error.
KernelSignature holds the input and output types for a kernel. Variable argument functions with a minimum of N arguments should pass up to N input types to be used to validate for invocation. The first N-1 types will be matched against the first N-1 arguments and the last type will be matched against the remaining arguments. InputTypes []InputType IsVarArgs bool OutType OutputType ( KernelSignature) Equals(other KernelSignature) bool (*KernelSignature) Hash() uint64 ( KernelSignature) MatchesInputs(types []arrow.DataType) bool ( KernelSignature) String() string KernelSignature : expvar.Var KernelSignature : fmt.Stringer func Kernel.GetSig() *KernelSignature func NonAggKernel.GetSig() *KernelSignature func NewScalarKernelWithSig(sig *KernelSignature, exec ArrayKernelExec, init KernelInitFn) ScalarKernel func NewVectorKernelWithSig(sig *KernelSignature, exec ArrayKernelExec, init KernelInitFn) VectorKernel func KernelSignature.Equals(other KernelSignature) bool
func OptionsInit[T](_ *KernelCtx, args KernelInitArgs) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CreateSetLookupState(opts kernels.SetLookupOptions, alloc memory.Allocator) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.InitRoundState(_ *KernelCtx, args KernelInitArgs) (KernelState, error) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.InitRoundToMultipleState(_ *KernelCtx, args KernelInitArgs) (KernelState, error)
MemAlloc is the preference for preallocating memory of fixed-width type outputs during kernel execution. func NonAggKernel.GetMemAlloc() MemAlloc func ScalarKernel.GetMemAlloc() MemAlloc func VectorKernel.GetMemAlloc() MemAlloc const MemNoPrealloc const MemPrealloc
NonAggKernel builds on the base Kernel interface for non aggregate execution kernels. Specifically this will represent Scalar and Vector kernels. ( NonAggKernel) CanFillSlices() bool ( NonAggKernel) Cleanup() error ( NonAggKernel) Exec(*KernelCtx, *ExecSpan, *ExecResult) error ( NonAggKernel) GetInitFn() KernelInitFn ( NonAggKernel) GetMemAlloc() MemAlloc ( NonAggKernel) GetNullHandling() NullHandling ( NonAggKernel) GetSig() *KernelSignature *ScalarKernel *VectorKernel NonAggKernel : Kernel
NullHandling is an enum representing how a particular Kernel wants the executor to handle nulls. func NonAggKernel.GetNullHandling() NullHandling func ScalarKernel.GetNullHandling() NullHandling func VectorKernel.GetNullHandling() NullHandling const NullComputedNoPrealloc const NullComputedPrealloc const NullIntersection const NullNoOutput
Kind ResolveKind Resolver TypeResolver Type arrow.DataType ( OutputType) Resolve(ctx *KernelCtx, types []arrow.DataType) (arrow.DataType, error) ( OutputType) String() string OutputType : expvar.Var OutputType : fmt.Stringer func NewComputedOutputType(resolver TypeResolver) OutputType func NewOutputType(dt arrow.DataType) OutputType func NewScalarKernel(in []InputType, out OutputType, exec ArrayKernelExec, init KernelInitFn) ScalarKernel func NewVectorKernel(inTypes []InputType, outType OutputType, exec ArrayKernelExec, init KernelInitFn) VectorKernel func github.com/apache/arrow-go/v18/arrow/compute.(*ScalarFunction).AddNewKernel(inTypes []InputType, outType OutputType, execFn ArrayKernelExec, init KernelInitFn) error func github.com/apache/arrow-go/v18/arrow/compute.(*VectorFunction).AddNewKernel(inTypes []InputType, outType OutputType, execFn ArrayKernelExec, init KernelInitFn) error func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCommonCastKernels(outID arrow.Type, outType OutputType) (out []ScalarKernel) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetZeroCastKernel(inID arrow.Type, inType InputType, out OutputType) ScalarKernel var github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OutputFirstType var github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OutputLastType var github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OutputResolveTemporal var github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.OutputTargetType
Type Parameters: T: arrow.FixedWidthType Values []T (*PrimitiveIter[T]) Next() (v T)
ResolveKind defines the way that a particular OutputType resolves its type. Either it has a fixed type to resolve to or it contains a Resolver which will compute the resolved type based on the input types. const ResolveComputed const ResolveFixed
A ScalarKernel is the kernel implementation for a Scalar Function. In addition to the members found in the base Kernel, it contains the null handling and memory pre-allocation preferences. CanWriteIntoSlices bool CleanupFn func(KernelState) error ExecFn ArrayKernelExec kernel.Data KernelState kernel.Init KernelInitFn kernel.Parallelizable bool kernel.Signature *KernelSignature MemAlloc MemAlloc NullHandling NullHandling ( ScalarKernel) CanFillSlices() bool (*ScalarKernel) Cleanup() error (*ScalarKernel) Exec(ctx *KernelCtx, sp *ExecSpan, out *ExecResult) error ( ScalarKernel) GetInitFn() KernelInitFn ( ScalarKernel) GetMemAlloc() MemAlloc ( ScalarKernel) GetNullHandling() NullHandling ( ScalarKernel) GetSig() *KernelSignature ScalarKernel : Kernel *ScalarKernel : NonAggKernel func NewScalarKernel(in []InputType, out OutputType, exec ArrayKernelExec, init KernelInitFn) ScalarKernel func NewScalarKernelWithSig(sig *KernelSignature, exec ArrayKernelExec, init KernelInitFn) ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.CompareKernels(op kernels.CompareOperator) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticBinaryKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticFloatingPointKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticFunctionTimeDuration(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticUnaryFixedIntOutKernels(otype arrow.DataType, op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticUnaryFloatingPointKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticUnaryKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetArithmeticUnarySignedKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetBitwiseBinaryKernels(op kernels.BitwiseOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetBitwiseUnaryKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetBooleanCastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCastToDecimal128() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCastToDecimal256() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCastToFloating[T](outType arrow.DataType) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCastToInteger[T](outType arrow.DataType) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCommonCastKernels(outID arrow.Type, outType OutputType) (out []ScalarKernel) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetCompareKernel(ty InputType, cmpType arrow.Type, op kernels.CompareOperator) ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetDate32CastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetDate64CastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetDecimalBinaryKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetDecimalUnaryKernels(op kernels.ArithmeticOp) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetDurationCastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetFsbCastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetIntervalCastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetRoundUnaryKernels(init KernelInitFn, knFn func(arrow.Type) ArrayKernelExec) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetShiftKernels(dir kernels.ShiftDir, checked bool) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetSimpleRoundKernels(mode kernels.RoundMode) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetTime32CastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetTime64CastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetTimestampCastKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetToBinaryKernels(outType arrow.DataType) []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetZeroCastKernel(inID arrow.Type, inType InputType, out OutputType) ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.IsNaNKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.IsNullNotNullKernels() []ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.NullExecKernel(nargs int) ScalarKernel func github.com/apache/arrow-go/v18/arrow/compute.(*ScalarFunction).AddKernel(k ScalarKernel) error
TypeMatcher define an interface for matching Input or Output types for execution kernels. There are multiple implementations of this interface provided by this package. ( TypeMatcher) Equals(other TypeMatcher) bool ( TypeMatcher) Matches(typ arrow.DataType) bool ( TypeMatcher) String() string TypeMatcher : expvar.Var TypeMatcher : fmt.Stringer func BinaryLike() TypeMatcher func DurationTypeUnit(unit arrow.TimeUnit) TypeMatcher func FixedSizeBinaryLike() TypeMatcher func Integer() TypeMatcher func LargeBinaryLike() TypeMatcher func Primitive() TypeMatcher func RunEndEncoded(runEndsMatcher, encodedMatcher TypeMatcher) TypeMatcher func SameTypeID(id arrow.Type) TypeMatcher func Time32TypeUnit(unit arrow.TimeUnit) TypeMatcher func Time64TypeUnit(unit arrow.TimeUnit) TypeMatcher func TimestampTypeUnit(unit arrow.TimeUnit) TypeMatcher func NewMatchedInput(match TypeMatcher) InputType func RunEndEncoded(runEndsMatcher, encodedMatcher TypeMatcher) TypeMatcher func TypeMatcher.Equals(other TypeMatcher) bool
TypeResolver is simply a function that takes a KernelCtx and a list of input types and returns the resolved type or an error.
Type Parameters: OffsetT: int32 | int64 Data []byte Offsets []OffsetT Pos int64 (*VarBinaryIter[OffsetT]) Next() []byte *VarBinaryIter : ArrayIter[[]byte]
VectorKernel is a structure for implementations of vector functions. It can optionally contain a finalizer function, the null handling and memory pre-allocation preferences (different defaults from scalar kernels when using NewVectorKernel), and other execution related options. CanExecuteChunkWise bool CanWriteIntoSlices bool ExecChunked ChunkedExec ExecFn ArrayKernelExec Finalize FinalizeFunc kernel.Data KernelState kernel.Init KernelInitFn kernel.Parallelizable bool kernel.Signature *KernelSignature MemAlloc MemAlloc NullHandling NullHandling OutputChunked bool ( VectorKernel) CanFillSlices() bool ( VectorKernel) Cleanup() error (*VectorKernel) Exec(ctx *KernelCtx, sp *ExecSpan, out *ExecResult) error ( VectorKernel) GetInitFn() KernelInitFn ( VectorKernel) GetMemAlloc() MemAlloc ( VectorKernel) GetNullHandling() NullHandling ( VectorKernel) GetSig() *KernelSignature VectorKernel : Kernel *VectorKernel : NonAggKernel func NewVectorKernel(inTypes []InputType, outType OutputType, exec ArrayKernelExec, init KernelInitFn) VectorKernel func NewVectorKernelWithSig(sig *KernelSignature, exec ArrayKernelExec, init KernelInitFn) VectorKernel func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetRunEndEncodeKernels() (encodeKns, decodeKns []VectorKernel) func github.com/apache/arrow-go/v18/arrow/compute/internal/kernels.GetVectorHashKernels() (unique, valueCounts, dictEncode []VectorKernel) func github.com/apache/arrow-go/v18/arrow/compute.(*VectorFunction).AddKernel(kernel VectorKernel) error
Package-Level Functions (total 38)
Type Parameters: T: arrow.NumericType | bool
Type Parameters: T: arrow.NumericType | bool
BinaryLike returns a TypeMatcher that will match Binary or String
DurationTypeUnit returns a TypeMatcher that will match only a Duration datatype with the specified TimeUnit.
FillZeroLength fills an ArraySpan with the appropriate information for a Zero Length Array of the provided type.
FixedSizeBinaryLike returns a TypeMatcher that will match FixedSizeBinary or Decimal128/256
GetAllocator retrieves the allocator from the context, or returns memory.DefaultAllocator if there was no allocator in the provided context.
Type Parameters: T: int32 | int64 GetSpanOffsets is like GetSpanValues, except it is only for int32 or int64 and adds the additional 1 expected value for an offset buffer (ie. len(output) == span.Len+1)
Type Parameters: T: arrow.FixedWidthType GetSpanValues returns a properly typed slice by reinterpreting the buffer at index i using unsafe.Slice. This will take into account the offset of the given ArraySpan.
func HashCombine(seed, value uint64) uint64
Integer returns a TypeMatcher which will match any integral type like int8 or uint16
LargeBinaryLike returns a TypeMatcher which will match LargeBinary or LargeString
Type Parameters: T: cmp.Ordered
Type Parameters: T: cmp.Ordered
Type Parameters: T: arrow.FixedWidthType
NewScalarKernel constructs a new kernel for scalar execution, constructing a KernelSignature with the provided input types and output type, and using the passed in execution implementation and initialization function.
NewScalarKernelWithSig is a convenience when you already have a signature to use for constructing a kernel. It's equivalent to passing the components of the signature (input and output types) to NewScalarKernel.
Type Parameters: OffsetT: int32 | int64
NewVectorKernel constructs a new kernel for execution of vector functions, which take into account more than just the individual scalar values of its input. Output of a vector kernel may be a different length than its inputs.
NewVectorKernelWithSig is a convenience function for creating a kernel when you already have a signature constructed.
Type Parameters: T: any OptionsInit should be used in the case where a KernelState is simply represented with a specific type by value (instead of pointer). This will initialize the KernelState as a value-copied instance of the passed in function options argument to ensure separation and allow the kernel to manipulate the options if necessary without any negative consequences since it will have its own copy of the options.
Primitive returns a TypeMatcher that will match any type that arrow.IsPrimitive returns true for.
PromoteExecSpanScalars promotes the values of the passed in ExecSpan from scalars to Arrays of length 1 for each value.
RunEndEncoded returns a matcher which matches a RunEndEncoded type whose encoded type is matched by the passed in matcher.
SameTypeID returns a type matcher which will match any DataType that uses the same arrow.Type ID as the one passed in here.
Time32TypeUnit returns a TypeMatcher that will match only a Time32 datatype with the specified TimeUnit.
Time64TypeUnit returns a TypeMatcher that will match only a Time64 datatype with the specified TimeUnit.
TimestampTypeUnit returns a TypeMatcher that will match only a Timestamp datatype with the specified TimeUnit.
WithAllocator returns a new context with the provided allocator embedded into the context.
Package-Level Constants (total 11)
const InputAny InputKind = 0
The kernel is responsible for allocating its own data buffer for fixed-width output types.
For data types that support pre-allocation (fixed-width), the kernel expects to be provided a pre-allocated buffer to write into. Non-fixed-width types must always allocate their own buffers. The allocation is made for the same length as the execution batch, so vector kernels yielding differently sized outputs should not use this. It is valid for the data to not be preallocated but the validity bitmap is (or is computed using intersection). For variable-size output types like Binary or String, or for nested types, this option has no effect.
Kernel will allocate and set the validity bitmap of the output
Kernel expects a pre-allocated buffer to write the result bitmap into.
Compute the output validity bitmap by intersection the validity bitmaps of the arguments using bitwise-and operations. This means that values in the output are valid/non-null only if the corresponding values in all input arguments were valid/non-null. Kernels generally do not have to touch the bitmap afterwards, but a kernel's exec function is permitted to alter the bitmap after the null intersection is computed if necessary.
kernel output is never null and a validity bitmap doesn't need to be allocated