package kernels

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

Dependency Relation
	imports 24 packages, and imported by one package


Package-Level Type Names (total 34)
/* sort by: | */
( Action) Flush(*exec.ExecResult) error ( Action) FlushFinal(*exec.ExecResult) error ( Action) ObserveFound(int) ( Action) ObserveNotFound(int) error ( Action) ObserveNullFound(int) ( Action) ObserveNullNotFound(int) error ( Action) Reserve(int) error ( Action) Reset() error ( Action) ShouldEncodeNulls() bool
( AndNotOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( AndNotOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( AndNotOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error AndNotOpKernel : SimpleBinaryKernel
( AndOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( AndOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( AndOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error AndOpKernel : SimpleBinaryKernel
func ArithmeticExec(ity, oty arrow.Type, op ArithmeticOp) exec.ArrayKernelExec func ArithmeticExecSameType(ty arrow.Type, op ArithmeticOp) exec.ArrayKernelExec func GetArithmeticBinaryKernels(op ArithmeticOp) []exec.ScalarKernel func GetArithmeticFloatingPointKernels(op ArithmeticOp) []exec.ScalarKernel func GetArithmeticFunctionTimeDuration(op ArithmeticOp) []exec.ScalarKernel func GetArithmeticUnaryFixedIntOutKernels(otype arrow.DataType, op ArithmeticOp) []exec.ScalarKernel func GetArithmeticUnaryFloatingPointKernels(op ArithmeticOp) []exec.ScalarKernel func GetArithmeticUnaryKernels(op ArithmeticOp) []exec.ScalarKernel func GetArithmeticUnarySignedKernels(op ArithmeticOp) []exec.ScalarKernel func GetDecimalBinaryKernels(op ArithmeticOp) []exec.ScalarKernel func GetDecimalUnaryKernels(op ArithmeticOp) []exec.ScalarKernel func SubtractDate32(op ArithmeticOp) exec.ArrayKernelExec const OpAbsoluteValue const OpAbsoluteValueChecked const OpAcos const OpAcosChecked const OpAdd const OpAddChecked const OpAsin const OpAsinChecked const OpAtan const OpAtan2 const OpCos const OpCosChecked const OpDiv const OpDivChecked const OpLn const OpLnChecked const OpLog10 const OpLog10Checked const OpLog1p const OpLog1pChecked const OpLog2 const OpLog2Checked const OpLogb const OpLogbChecked const OpMul const OpMulChecked const OpNegate const OpNegateChecked const OpPower const OpPowerChecked const OpSign const OpSin const OpSinChecked const OpSqrt const OpSqrtChecked const OpSub const OpSubChecked const OpTan const OpTanChecked
func GetBitwiseBinaryKernels(op BitwiseOp) []exec.ScalarKernel const OpBitAnd const OpBitOr const OpBitXor
AllowDecimalTruncate bool AllowFloatTruncate bool AllowIntOverflow bool AllowInvalidUtf8 bool AllowTimeOverflow bool AllowTimeTruncate bool ToType arrow.DataType ( CastOptions) TypeName() string CastOptions : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions
CastState is the kernel state for Cast functions, it is an alias to the CastOptions object.
(*CompareData) Funcs() *CompareData *CompareData : CompareFuncData func (*CompareData).Funcs() *CompareData func CompareFuncData.Funcs() *CompareData
( CompareFuncData) Funcs() *CompareData *CompareData
( CompareOperator) String() string CompareOperator : expvar.Var CompareOperator : fmt.Stringer func CompareKernels(op CompareOperator) []exec.ScalarKernel func GetCompareKernel(ty exec.InputType, cmpType arrow.Type, op CompareOperator) exec.ScalarKernel const CmpEQ const CmpGE const CmpGT const CmpLE const CmpLT const CmpNE
NullSelection NullSelectionBehavior ( FilterOptions) TypeName() string FilterOptions : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions
type FilterState = FilterOptions (struct)
( HashState) Allocator() memory.Allocator Append prepares the action for the given input (reserving appropriately sized data structures, etc.) and visits the input with the Action Flush out accumulated results from last invocation FlushFinal flushes the accumulated results across all invocations of calls. The kernel should not be used again until after Reset() is called. GetDictionary returns the values (keys) accumulated in the dictionary so far. Reset for another run ( HashState) ValueType() arrow.DataType
( KleeneAndNotOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( KleeneAndNotOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( KleeneAndNotOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error KleeneAndNotOpKernel : SimpleBinaryKernel
( KleeneAndOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( KleeneAndOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( KleeneAndOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error KleeneAndOpKernel : SimpleBinaryKernel
( KleeneOrOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( KleeneOrOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( KleeneOrOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error KleeneOrOpKernel : SimpleBinaryKernel
const NullMatchingEmitNull const NullMatchingInconclusive const NullMatchingMatch const NullMatchingSkip const github.com/apache/arrow-go/v18/arrow/compute.NullMatchingEmitNull const github.com/apache/arrow-go/v18/arrow/compute.NullMatchingInconclusive const github.com/apache/arrow-go/v18/arrow/compute.NullMatchingMatch const github.com/apache/arrow-go/v18/arrow/compute.NullMatchingSkip
func GetTakeIndices(mem memory.Allocator, filter *exec.ArraySpan, nullSelect NullSelectionBehavior) (arrow.ArrayData, error) const DropNulls const EmitNulls const github.com/apache/arrow-go/v18/arrow/compute.SelectionDropNulls const github.com/apache/arrow-go/v18/arrow/compute.SelectionEmitNulls
( OrOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( OrOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( OrOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error OrOpKernel : SimpleBinaryKernel
( RoundMode) String() string RoundMode : expvar.Var RoundMode : fmt.Stringer func FixedRoundDecimalExec[T](mode RoundMode) exec.ArrayKernelExec func GetSimpleRoundKernels(mode RoundMode) []exec.ScalarKernel const AwayFromZero const HalfAwayFromZero const HalfDown const HalfToEven const HalfToOdd const HalfTowardsZero const HalfUp const RoundDown const RoundUp const TowardsZero const github.com/apache/arrow-go/v18/arrow/compute.RoundDown const github.com/apache/arrow-go/v18/arrow/compute.RoundHalfDown const github.com/apache/arrow-go/v18/arrow/compute.RoundHalfToEven const github.com/apache/arrow-go/v18/arrow/compute.RoundHalfToOdd const github.com/apache/arrow-go/v18/arrow/compute.RoundHalfTowardsInfinity const github.com/apache/arrow-go/v18/arrow/compute.RoundHalfTowardsZero const github.com/apache/arrow-go/v18/arrow/compute.RoundHalfUp const github.com/apache/arrow-go/v18/arrow/compute.RoundTowardsInfinity const github.com/apache/arrow-go/v18/arrow/compute.RoundTowardsZero const github.com/apache/arrow-go/v18/arrow/compute.RoundUp
Mode RoundMode NDigits int64 ( RoundOptions) TypeName() string RoundOptions : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions var github.com/apache/arrow-go/v18/arrow/compute.DefaultRoundOptions
Pow10 float64 RoundOptions RoundOptions RoundOptions.Mode RoundMode RoundOptions.NDigits int64 ( RoundState) TypeName() string RoundState : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions
Mode is the rounding and tie-breaking mode Multiple is the multiple to round to. Should be a positive numeric scalar of a type compatible with the argument to be rounded. The cast kernel is used to convert the rounding multiple to match the result type. ( RoundToMultipleOptions) TypeName() string RoundToMultipleOptions : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions var github.com/apache/arrow-go/v18/arrow/compute.DefaultRoundToMultipleOptions
RunEndType arrow.DataType ( RunEndEncodeState) TypeName() string RunEndEncodeState : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions
type RunEndsType (interface)
Chunked exec.ChunkedExec Exec exec.ArrayKernelExec In exec.InputType func GetVectorSelectionKernels() (filterkernels, takeKernels []SelectionKernelData)
NullBehavior NullMatchingBehavior TotalLen int64 ValueSet []exec.ArraySpan ValueSetType arrow.DataType func CreateSetLookupState(opts SetLookupOptions, alloc memory.Allocator) (exec.KernelState, error) func (*SetLookupState)[T].Init(opts SetLookupOptions) error
Type Parameters: T: hashing.MemoTypes Alloc memory.Allocator Lookup hashing.TypedMemoTable[T] When there are duplicates in value set, memotable indices must be mapped back to indices in the value set NullBehavior NullMatchingBehavior NullIndex int32 ValueSetType arrow.DataType (*SetLookupState[T]) AddArrayValueSet(data *exec.ArraySpan, startIdx int64) error (*SetLookupState[T]) Init(opts SetLookupOptions) error (*SetLookupState[T]) ValueType() arrow.DataType
func GetShiftKernels(dir ShiftDir, checked bool) []exec.ScalarKernel const ShiftLeft const ShiftRight
BoundsCheck bool ( TakeOptions) TypeName() string TakeOptions : github.com/apache/arrow-go/v18/arrow/compute.FunctionOptions
type TakeState = TakeOptions (struct)
( XorOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error ( XorOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error ( XorOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error XorOpKernel : SimpleBinaryKernel
Package-Level Functions (total 114)
Type Parameters: InOffsetsT: int32 | int64 OutOffsetsT: int32 | int64
Type Parameters: T: arrow.IntType | arrow.UintType
Type Parameters: T: arrow.IntType | arrow.UintType
Type Parameters: OutT: constraints.Float
CastFromNull is a simple kernel for constructing an array of null values for the requested data type, allowing casting of an arrow.Null typed value to any other arbitrary data type.
Type Parameters: OffsetsT: int32 | int64
Type Parameters: OutT: decimal128.Num | decimal256.Num Arg0: arrow.IntType | arrow.UintType
Type Parameters: InT: numeric
Type Parameters: OutT: numeric
Type Parameters: InT: numeric OutT: numeric
func FSBImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error
func FSLImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error
GetBooleanCastKernels returns the slice of scalar kernels for casting values *to* a boolean type.
Type Parameters: T: constraints.Float | float16.Num
Type Parameters: T: arrow.IntType | arrow.UintType
GetCommonCastKernels returns the list of kernels common to all types such as casting from null or from Extension types of the appropriate underlying type.
func GetRunEndEncodeKernels() (encodeKns, decodeKns []exec.VectorKernel)
func GetVectorHashKernels() (unique, valueCounts, dictEncode []exec.VectorKernel)
func GetVectorSelectionKernels() (filterkernels, takeKernels []SelectionKernelData)
GetZeroCastKernel returns a kernel for performing ZeroCast execution using the ZeroCopyCastExec kernel function.
Type Parameters: OffsetT: int32 | int64
Type Parameters: T: constraints.Integer MaxOf determines the max value for a given type since there is not currently a generic way to do this for Go generics yet as all of the math.Max/Min values are constants.
Type Parameters: T: constraints.Integer MinOf returns the minimum value for a given type since there is not currently a generic way to do this with Go generics yet.
scalar kernel that ignores (assumed all-null inputs) and returns null
OutputAllNull is a simple kernel that initializes the output as an array whose output is all null by setting nulls to the length.
Type Parameters: OutT: arrow.FixedWidthType Arg0T: arrow.FixedWidthType Arg1T: arrow.FixedWidthType
Type Parameters: OutT: arrow.FixedWidthType Arg0T: arrow.FixedWidthType Arg1T: arrow.FixedWidthType
Type Parameters: OutT: arrow.FixedWidthType Arg0T: arrow.FixedWidthType ScalarUnary returns a kernel for performing a unary operation on FixedWidth types which is implemented using the passed in function which will receive a slice containing the raw input data along with a slice to populate for the output data. Note that bool is not included in arrow.FixedWidthType since it is represented as a bitmap, not as a slice of bool.
Type Parameters: OutT: arrow.FixedWidthType ScalarUnaryBoolArg is like ScalarUnary except it specifically expects a function that takes a byte slice since booleans arrays are represented as a bitmap.
Type Parameters: Arg0T: arrow.FixedWidthType ScalarUnaryBoolOutput is like ScalarUnary only it is for cases of boolean output. The function should take in a slice of the input type and a slice of bytes to fill with the output boolean bitmap.
Type Parameters: OutT: arrow.FixedWidthType Arg0T: arrow.FixedWidthType ScalarUnaryNotNull is for generating a kernel to operate only on the non-null values in the input array. The zerovalue of the output type is used for any null input values.
Type Parameters: OutT: arrow.FixedWidthType OffsetT: int32 | int64 ScalarUnaryNotNullBinaryArg creates a unary kernel that accepts a binary type input (Binary [offset int32], String [offset int32], LargeBinary [offset int64], LargeString [offset int64]) and returns a FixedWidthType output which is never null. It implements the handling to iterate the offsets and values calling the provided function on each byte slice. The zero value of the OutT will be used as the output for elements of the input that are null.
Type Parameters: OffsetT: int32 | int64 ScalarUnaryNotNullBinaryArgBoolOut creates a unary kernel that accepts a binary type input (Binary [offset int32], String [offset int32], LargeBinary [offset int64], LargeString [offset int64]) and returns a boolean output which is never null. It implements the handling to iterate the offsets and values calling the provided function on each byte slice. The provided default value will be used as the output for elements of the input that are null.
Type Parameters: InT: int32 | int64 OutT: int32 | int64
Type Parameters: K: SimpleBinaryKernel
Type Parameters: T: constraints.Integer SizeOf determines the size in number of bytes for an integer based on the generic value in a way that the compiler should be able to easily evaluate and create as a constant.
Type Parameters: OffsetT: int32 | int64
func StructImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error
Type Parameters: T: arrow.FixedWidthType
Type Parameters: OffsetT: int32 | int64
ZeroCopyCastExec is a kernel for performing a cast which can be executed as a zero-copy operation. It simply forwards the buffers to the output. This can be used for casting a type to itself, or for casts between equivalent representations such as Int32 and Date32.
Package-Level Constants (total 66)
Round negative values with DOWN and positive values with UP
const CmpEQ CompareOperator = 0 // equal
const CmpGE CompareOperator = 3 // greater_equal
const CmpGT CompareOperator = 2 // greater
const CmpLE CompareOperator = 5 // less_equal
const CmpLT CompareOperator = 4 // less
const CmpNE CompareOperator = 1 // not_equal
Round ties with AwayFromZero (aka "round half towards infinity")
Round ties with DOWN (aka "round half towards negative infinity")
Round ties to nearest even integer
Round ties to nearest odd integer
Round ties with TowardsZero (aka "round half away from infinity")
Round ties with UP (aka "round half towards positive infinity")
const OpAcos ArithmeticOp = 12
const OpAdd ArithmeticOp = 0
Checked versions will not use SIMD except for float32/float64 impls
const OpAsin ArithmeticOp = 11
const OpAtan ArithmeticOp = 13
const OpAtan2 ArithmeticOp = 14
const OpBitAnd BitwiseOp = 0
const OpBitOr BitwiseOp = 1
const OpBitXor BitwiseOp = 2
const OpCos ArithmeticOp = 9
const OpDiv ArithmeticOp = 3
const OpLn ArithmeticOp = 15
const OpLog10 ArithmeticOp = 16
const OpLog1p ArithmeticOp = 18
const OpLog2 ArithmeticOp = 17
const OpLogb ArithmeticOp = 19
const OpMul ArithmeticOp = 2
End NO SIMD
const OpSin ArithmeticOp = 8
NO SIMD for the following yet
No SIMD impls for the rest of these yet
const OpSub ArithmeticOp = 1
const OpTan ArithmeticOp = 10
Round to nearest integer less than or equal in magnitude (aka "floor")
Round to nearest integer greater than or equal in magnitude (aka "ceil")
const ShiftLeft ShiftDir = 0
const ShiftRight ShiftDir = 1
Get integral part without fractional digits (aka "trunc")