Documentation ¶
Overview ¶
Package kernels defines all of the computation kernels for the compute library. This requires >= go1.18 since it utilizes Go generics.
Index ¶
- Variables
- func ArithmeticExec(ity, oty arrow.Type, op ArithmeticOp) exec.ArrayKernelExec
- func ArithmeticExecSameType(ty arrow.Type, op ArithmeticOp) exec.ArrayKernelExec
- func CanCastFromDict(id arrow.Type) bool
- func CastBinaryToBinary[InOffsetsT, OutOffsetsT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastDecimal128ToInteger[T arrow.IntType | arrow.UintType](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastDecimal256ToInteger[T arrow.IntType | arrow.UintType](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastDecimalToDecimal(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastDecimalToFloating[OutT constraints.Float](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFloat32ToDecimal(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFloat64ToDecimal(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFloatingToFloating(_ *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFloatingToInteger(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFromNull(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFsbToBinary[OffsetsT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastFsbToFsb(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastIntToInt(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastIntegerToDecimal[OutT decimal128.Num | decimal256.Num, Arg0 arrow.IntType | arrow.UintType](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func CastIntegerToFloating(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func ChunkedPrimitiveTake(ctx *exec.KernelCtx, batch []*arrow.Chunked, out *exec.ExecResult) ([]*exec.ExecResult, error)
- func ChunkedTakeSupported(dt arrow.DataType) bool
- func CompareKernels(op CompareOperator) []exec.ScalarKernel
- func DenseUnionImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, ...) error
- func DoStaticCast[InT, OutT numeric](in []InT, out []OutT)
- func FSBImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, ...) error
- func FSLImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, ...) error
- func FilterBinary(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func FilterExec(impl selectionImplFn) exec.ArrayKernelExec
- func FixedRoundDecimalExec[T decimal128.Num | decimal256.Num](mode RoundMode) 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 GetBitwiseBinaryKernels(op BitwiseOp) []exec.ScalarKernel
- func GetBitwiseUnaryKernels() []exec.ScalarKernel
- func GetBooleanCastKernels() []exec.ScalarKernel
- func GetCastToDecimal128() []exec.ScalarKernel
- func GetCastToDecimal256() []exec.ScalarKernel
- func GetCastToFloating[T constraints.Float](outType arrow.DataType) []exec.ScalarKernel
- func GetCastToInteger[T arrow.IntType | arrow.UintType](outType arrow.DataType) []exec.ScalarKernel
- func GetCommonCastKernels(outID arrow.Type, outType exec.OutputType) (out []exec.ScalarKernel)
- func GetCompareKernel(ty exec.InputType, cmpType arrow.Type, op CompareOperator) exec.ScalarKernel
- func GetDate32CastKernels() []exec.ScalarKernel
- func GetDate64CastKernels() []exec.ScalarKernel
- func GetDecimalBinaryKernels(op ArithmeticOp) []exec.ScalarKernel
- func GetDecimalUnaryKernels(op ArithmeticOp) []exec.ScalarKernel
- func GetDurationCastKernels() []exec.ScalarKernel
- func GetFsbCastKernels() []exec.ScalarKernel
- func GetIntervalCastKernels() []exec.ScalarKernel
- func GetRoundUnaryKernels(init exec.KernelInitFn, knFn func(arrow.Type) exec.ArrayKernelExec) []exec.ScalarKernel
- func GetRunEndEncodeKernels() (encodeKns, decodeKns []exec.VectorKernel)
- func GetShiftKernels(dir ShiftDir, checked bool) []exec.ScalarKernel
- func GetSimpleRoundKernels(mode RoundMode) []exec.ScalarKernel
- func GetTakeIndices(mem memory.Allocator, filter *exec.ArraySpan, nullSelect NullSelectionBehavior) (arrow.ArrayData, error)
- func GetTime32CastKernels() []exec.ScalarKernel
- func GetTime64CastKernels() []exec.ScalarKernel
- func GetTimestampCastKernels() []exec.ScalarKernel
- func GetToBinaryKernels(outType arrow.DataType) []exec.ScalarKernel
- func GetVectorHashKernels() (unique, valueCounts, dictEncode []exec.VectorKernel)
- func GetZeroCastKernel(inID arrow.Type, inType exec.InputType, out exec.OutputType) exec.ScalarKernel
- func InitRoundState(_ *exec.KernelCtx, args exec.KernelInitArgs) (exec.KernelState, error)
- func InitRoundToMultipleState(_ *exec.KernelCtx, args exec.KernelInitArgs) (exec.KernelState, error)
- func ListImpl[OffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, ...) error
- func MaxDecimalDigitsForInt(id arrow.Type) (int32, error)
- func MaxOf[T constraints.Integer]() T
- func MinOf[T constraints.Integer]() T
- func NullExecKernel(nargs int) exec.ScalarKernel
- func NullFilter(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func NullTake(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func NullToNullExec(_ *exec.KernelCtx, _ *exec.ExecSpan, _ *exec.ExecResult) error
- func OutputAllNull(_ *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func PrimitiveFilter(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func PrimitiveTake(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func ResolveOutputFromOptions(ctx *exec.KernelCtx, _ []arrow.DataType) (arrow.DataType, error)
- func ScalarBinary[OutT, Arg0T, Arg1T arrow.FixedWidthType](ops binaryOps[OutT, Arg0T, Arg1T]) exec.ArrayKernelExec
- func ScalarBinaryBinaryArgsBoolOut(itrFn func(*exec.ArraySpan) exec.ArrayIter[[]byte], op binaryBinOp[bool]) exec.ArrayKernelExec
- func ScalarBinaryBools(ops *binaryBoolOps) exec.ArrayKernelExec
- func ScalarBinaryNotNull[OutT, Arg0T, Arg1T arrow.FixedWidthType](op func(*exec.KernelCtx, Arg0T, Arg1T, *error) OutT) exec.ArrayKernelExec
- func ScalarUnary[OutT, Arg0T arrow.FixedWidthType](op func(*exec.KernelCtx, []Arg0T, []OutT) error) exec.ArrayKernelExec
- func ScalarUnaryBoolArg[OutT arrow.FixedWidthType](op func(*exec.KernelCtx, []byte, []OutT) error) exec.ArrayKernelExec
- func ScalarUnaryBoolOutput[Arg0T arrow.FixedWidthType](op func(*exec.KernelCtx, []Arg0T, []byte) error) exec.ArrayKernelExec
- func ScalarUnaryNotNull[OutT, Arg0T arrow.FixedWidthType](op func(*exec.KernelCtx, Arg0T, *error) OutT) exec.ArrayKernelExec
- func ScalarUnaryNotNullBinaryArg[OutT arrow.FixedWidthType, OffsetT int32 | int64](op func(*exec.KernelCtx, []byte, *error) OutT) exec.ArrayKernelExec
- func ScalarUnaryNotNullBinaryArgBoolOut[OffsetT int32 | int64](defVal bool, op func(*exec.KernelCtx, []byte, *error) bool) exec.ArrayKernelExec
- func ShiftTime[InT, OutT int32 | int64](ctx *exec.KernelCtx, op arrow.TimestampConvertOp, factor int64, ...) error
- func SimpleBinary[K SimpleBinaryKernel](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func SimpleTemporalCast[I, O arrow.Duration | arrow.Time32 | arrow.Time64 | arrow.Timestamp](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func SizeOf[T constraints.Integer]() uint
- func StringToTimestamp[OffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func StructImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, ...) error
- func SubtractDate32(op ArithmeticOp) exec.ArrayKernelExec
- func TakeExec(impl selectionImplFn) exec.ArrayKernelExec
- func TimestampToDate32(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func TimestampToDate64(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func TimestampToTime32(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func TimestampToTime64(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- func UnaryRoundExec(ty arrow.Type) exec.ArrayKernelExec
- func UnaryRoundToMultipleExec(ty arrow.Type) exec.ArrayKernelExec
- func UnboxBinaryScalar(val scalar.BinaryScalar) []byte
- func UnboxScalar[T arrow.FixedWidthType](val scalar.PrimitiveScalar) T
- func VarBinaryImpl[OffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, ...) error
- func ZeroCopyCastExec(_ *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
- type Action
- type AndNotOpKernel
- func (AndNotOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (AndNotOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (AndNotOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
- type AndOpKernel
- func (AndOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (AndOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (AndOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
- type ArithmeticOp
- type BitwiseOp
- type CastOptions
- type CastState
- type CompareData
- type CompareFuncData
- type CompareOperator
- type FilterOptions
- type FilterState
- type HashState
- type KleeneAndNotOpKernel
- func (KleeneAndNotOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (KleeneAndNotOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (KleeneAndNotOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
- type KleeneAndOpKernel
- func (KleeneAndOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (KleeneAndOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (KleeneAndOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
- type KleeneOrOpKernel
- func (KleeneOrOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (KleeneOrOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (KleeneOrOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
- type NullSelectionBehavior
- type OrOpKernel
- func (OrOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (OrOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (OrOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
- type RoundMode
- type RoundOptions
- type RoundState
- type RoundToMultipleOptions
- type RoundToMultipleState
- type RunEndEncodeState
- type RunEndsType
- type SelectionKernelData
- type ShiftDir
- type SimpleBinaryKernel
- type TakeOptions
- type TakeState
- type XorOpKernel
- func (XorOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
- func (XorOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, ...) error
- func (XorOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, ...) error
Constants ¶
This section is empty.
Variables ¶
var OutputFirstType = exec.NewComputedOutputType(func(_ *exec.KernelCtx, args []arrow.DataType) (arrow.DataType, error) { return args[0], nil })
var OutputLastType = exec.NewComputedOutputType(func(_ *exec.KernelCtx, args []arrow.DataType) (arrow.DataType, error) { return args[len(args)-1], nil })
var OutputResolveTemporal = exec.NewComputedOutputType(resolveTemporalOutput)
var OutputTargetType = exec.NewComputedOutputType(ResolveOutputFromOptions)
Functions ¶
func ArithmeticExec ¶
func ArithmeticExec(ity, oty arrow.Type, op ArithmeticOp) exec.ArrayKernelExec
func ArithmeticExecSameType ¶
func ArithmeticExecSameType(ty arrow.Type, op ArithmeticOp) exec.ArrayKernelExec
func CanCastFromDict ¶
func CastBinaryToBinary ¶
func CastDecimal128ToInteger ¶
func CastDecimal256ToInteger ¶
func CastDecimalToDecimal ¶
func CastDecimalToFloating ¶
func CastDecimalToFloating[OutT constraints.Float](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
func CastFloat32ToDecimal ¶
func CastFloat64ToDecimal ¶
func CastFloatingToFloating ¶
func CastFloatingToInteger ¶
func CastFromNull ¶
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.
func CastFsbToBinary ¶
func CastFsbToFsb ¶
func CastIntToInt ¶
func CastIntegerToDecimal ¶
func CastIntegerToDecimal[OutT decimal128.Num | decimal256.Num, Arg0 arrow.IntType | arrow.UintType](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
func CastIntegerToFloating ¶
func ChunkedPrimitiveTake ¶
func ChunkedPrimitiveTake(ctx *exec.KernelCtx, batch []*arrow.Chunked, out *exec.ExecResult) ([]*exec.ExecResult, error)
func ChunkedTakeSupported ¶
func CompareKernels ¶
func CompareKernels(op CompareOperator) []exec.ScalarKernel
func DenseUnionImpl ¶
func DoStaticCast ¶
func DoStaticCast[InT, OutT numeric](in []InT, out []OutT)
func FilterBinary ¶
func FilterExec ¶
func FilterExec(impl selectionImplFn) exec.ArrayKernelExec
func FixedRoundDecimalExec ¶
func FixedRoundDecimalExec[T decimal128.Num | decimal256.Num](mode RoundMode) exec.ArrayKernelExec
func GetArithmeticBinaryKernels ¶
func GetArithmeticBinaryKernels(op ArithmeticOp) []exec.ScalarKernel
func GetArithmeticFloatingPointKernels ¶
func GetArithmeticFloatingPointKernels(op ArithmeticOp) []exec.ScalarKernel
func GetArithmeticFunctionTimeDuration ¶
func GetArithmeticFunctionTimeDuration(op ArithmeticOp) []exec.ScalarKernel
func GetArithmeticUnaryFixedIntOutKernels ¶
func GetArithmeticUnaryFixedIntOutKernels(otype arrow.DataType, op ArithmeticOp) []exec.ScalarKernel
func GetArithmeticUnaryFloatingPointKernels ¶
func GetArithmeticUnaryFloatingPointKernels(op ArithmeticOp) []exec.ScalarKernel
func GetArithmeticUnaryKernels ¶
func GetArithmeticUnaryKernels(op ArithmeticOp) []exec.ScalarKernel
func GetArithmeticUnarySignedKernels ¶
func GetArithmeticUnarySignedKernels(op ArithmeticOp) []exec.ScalarKernel
func GetBitwiseBinaryKernels ¶
func GetBitwiseBinaryKernels(op BitwiseOp) []exec.ScalarKernel
func GetBitwiseUnaryKernels ¶
func GetBitwiseUnaryKernels() []exec.ScalarKernel
func GetBooleanCastKernels ¶
func GetBooleanCastKernels() []exec.ScalarKernel
GetBooleanCastKernels returns the slice of scalar kernels for casting values *to* a boolean type.
func GetCastToDecimal128 ¶
func GetCastToDecimal128() []exec.ScalarKernel
func GetCastToDecimal256 ¶
func GetCastToDecimal256() []exec.ScalarKernel
func GetCastToFloating ¶
func GetCastToFloating[T constraints.Float](outType arrow.DataType) []exec.ScalarKernel
func GetCastToInteger ¶
func GetCommonCastKernels ¶
func GetCommonCastKernels(outID arrow.Type, outType exec.OutputType) (out []exec.ScalarKernel)
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 GetCompareKernel ¶
func GetCompareKernel(ty exec.InputType, cmpType arrow.Type, op CompareOperator) exec.ScalarKernel
func GetDate32CastKernels ¶
func GetDate32CastKernels() []exec.ScalarKernel
func GetDate64CastKernels ¶
func GetDate64CastKernels() []exec.ScalarKernel
func GetDecimalBinaryKernels ¶
func GetDecimalBinaryKernels(op ArithmeticOp) []exec.ScalarKernel
func GetDecimalUnaryKernels ¶
func GetDecimalUnaryKernels(op ArithmeticOp) []exec.ScalarKernel
func GetDurationCastKernels ¶
func GetDurationCastKernels() []exec.ScalarKernel
func GetFsbCastKernels ¶
func GetFsbCastKernels() []exec.ScalarKernel
func GetIntervalCastKernels ¶
func GetIntervalCastKernels() []exec.ScalarKernel
func GetRoundUnaryKernels ¶
func GetRoundUnaryKernels(init exec.KernelInitFn, knFn func(arrow.Type) exec.ArrayKernelExec) []exec.ScalarKernel
func GetRunEndEncodeKernels ¶
func GetRunEndEncodeKernels() (encodeKns, decodeKns []exec.VectorKernel)
func GetShiftKernels ¶
func GetShiftKernels(dir ShiftDir, checked bool) []exec.ScalarKernel
func GetSimpleRoundKernels ¶
func GetSimpleRoundKernels(mode RoundMode) []exec.ScalarKernel
func GetTakeIndices ¶
func GetTime32CastKernels ¶
func GetTime32CastKernels() []exec.ScalarKernel
func GetTime64CastKernels ¶
func GetTime64CastKernels() []exec.ScalarKernel
func GetTimestampCastKernels ¶
func GetTimestampCastKernels() []exec.ScalarKernel
func GetToBinaryKernels ¶
func GetToBinaryKernels(outType arrow.DataType) []exec.ScalarKernel
func GetVectorHashKernels ¶
func GetVectorHashKernels() (unique, valueCounts, dictEncode []exec.VectorKernel)
func GetZeroCastKernel ¶
func GetZeroCastKernel(inID arrow.Type, inType exec.InputType, out exec.OutputType) exec.ScalarKernel
GetZeroCastKernel returns a kernel for performing ZeroCast execution using the ZeroCopyCastExec kernel function.
func InitRoundState ¶
func InitRoundState(_ *exec.KernelCtx, args exec.KernelInitArgs) (exec.KernelState, error)
func InitRoundToMultipleState ¶
func InitRoundToMultipleState(_ *exec.KernelCtx, args exec.KernelInitArgs) (exec.KernelState, error)
func MaxOf ¶
func MaxOf[T constraints.Integer]() T
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.
func MinOf ¶
func MinOf[T constraints.Integer]() T
MinOf returns the minimum value for a given type since there is not currently a generic way to do this with Go generics yet.
func NullExecKernel ¶
func NullExecKernel(nargs int) exec.ScalarKernel
func NullFilter ¶
func NullToNullExec ¶
scalar kernel that ignores (assumed all-null inputs) and returns null
func OutputAllNull ¶
OutputAllNull is a simple kernel that initializes the output as an array whose output is all null by setting nulls to the length.
func PrimitiveFilter ¶
func PrimitiveTake ¶
func ScalarBinary ¶
func ScalarBinary[OutT, Arg0T, Arg1T arrow.FixedWidthType](ops binaryOps[OutT, Arg0T, Arg1T]) exec.ArrayKernelExec
func ScalarBinaryBools ¶
func ScalarBinaryBools(ops *binaryBoolOps) exec.ArrayKernelExec
func ScalarBinaryNotNull ¶
func ScalarBinaryNotNull[OutT, Arg0T, Arg1T arrow.FixedWidthType](op func(*exec.KernelCtx, Arg0T, Arg1T, *error) OutT) exec.ArrayKernelExec
func ScalarUnary ¶
func ScalarUnary[OutT, Arg0T arrow.FixedWidthType](op func(*exec.KernelCtx, []Arg0T, []OutT) error) exec.ArrayKernelExec
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.
func ScalarUnaryBoolArg ¶
func ScalarUnaryBoolArg[OutT arrow.FixedWidthType](op func(*exec.KernelCtx, []byte, []OutT) error) exec.ArrayKernelExec
ScalarUnaryBoolArg is like ScalarUnary except it specifically expects a function that takes a byte slice since booleans arrays are represented as a bitmap.
func ScalarUnaryBoolOutput ¶
func ScalarUnaryBoolOutput[Arg0T arrow.FixedWidthType](op func(*exec.KernelCtx, []Arg0T, []byte) error) exec.ArrayKernelExec
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.
func ScalarUnaryNotNull ¶
func ScalarUnaryNotNull[OutT, Arg0T arrow.FixedWidthType](op func(*exec.KernelCtx, Arg0T, *error) OutT) exec.ArrayKernelExec
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.
func ScalarUnaryNotNullBinaryArg ¶
func ScalarUnaryNotNullBinaryArg[OutT arrow.FixedWidthType, OffsetT int32 | int64](op func(*exec.KernelCtx, []byte, *error) OutT) exec.ArrayKernelExec
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.
func ScalarUnaryNotNullBinaryArgBoolOut ¶
func ScalarUnaryNotNullBinaryArgBoolOut[OffsetT int32 | int64](defVal bool, op func(*exec.KernelCtx, []byte, *error) bool) exec.ArrayKernelExec
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.
func SimpleBinary ¶
func SimpleBinary[K SimpleBinaryKernel](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error
func SimpleTemporalCast ¶
func SizeOf ¶
func SizeOf[T constraints.Integer]() uint
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.
func StringToTimestamp ¶
func StructImpl ¶
func SubtractDate32 ¶
func SubtractDate32(op ArithmeticOp) exec.ArrayKernelExec
func TakeExec ¶
func TakeExec(impl selectionImplFn) exec.ArrayKernelExec
func TimestampToDate32 ¶
func TimestampToDate64 ¶
func TimestampToTime32 ¶
func TimestampToTime64 ¶
func UnaryRoundExec ¶
func UnaryRoundExec(ty arrow.Type) exec.ArrayKernelExec
func UnaryRoundToMultipleExec ¶
func UnaryRoundToMultipleExec(ty arrow.Type) exec.ArrayKernelExec
func UnboxBinaryScalar ¶
func UnboxBinaryScalar(val scalar.BinaryScalar) []byte
func UnboxScalar ¶
func UnboxScalar[T arrow.FixedWidthType](val scalar.PrimitiveScalar) T
func VarBinaryImpl ¶
func ZeroCopyCastExec ¶
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.
Types ¶
type AndNotOpKernel ¶
type AndNotOpKernel struct{}
func (AndNotOpKernel) Call ¶
func (AndNotOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (AndNotOpKernel) CallScalarLeft ¶
func (AndNotOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
func (AndNotOpKernel) CallScalarRight ¶
func (AndNotOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error
type AndOpKernel ¶
type AndOpKernel struct {
// contains filtered or unexported fields
}
func (AndOpKernel) Call ¶
func (AndOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (AndOpKernel) CallScalarLeft ¶
func (AndOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
type ArithmeticOp ¶
type ArithmeticOp int8
const ( OpAdd ArithmeticOp = iota OpSub OpMul OpDiv OpAbsoluteValue OpNegate // NO SIMD for the following yet OpSqrt OpPower OpSin OpCos OpTan OpAsin OpAcos OpAtan OpAtan2 OpLn OpLog10 OpLog2 OpLog1p OpLogb // End NO SIMD OpSign // Checked versions will not use SIMD except for float32/float64 impls OpAddChecked OpSubChecked OpMulChecked OpDivChecked OpAbsoluteValueChecked OpNegateChecked // No SIMD impls for the rest of these yet OpSqrtChecked OpPowerChecked OpSinChecked OpCosChecked OpTanChecked OpAsinChecked OpAcosChecked OpLnChecked OpLog10Checked OpLog2Checked OpLog1pChecked OpLogbChecked )
type CastOptions ¶
type CastOptions struct { ToType arrow.DataType `compute:"to_type"` AllowIntOverflow bool `compute:"allow_int_overflow"` AllowTimeTruncate bool `compute:"allow_time_truncate"` AllowTimeOverflow bool `compute:"allow_time_overflow"` AllowDecimalTruncate bool `compute:"allow_decimal_truncate"` AllowFloatTruncate bool `compute:"allow_float_truncate"` AllowInvalidUtf8 bool `compute:"allow_invalid_utf8"` }
func (CastOptions) TypeName ¶
func (CastOptions) TypeName() string
type CastState ¶
type CastState = CastOptions
CastState is the kernel state for Cast functions, it is an alias to the CastOptions object.
type CompareData ¶
type CompareData struct {
// contains filtered or unexported fields
}
func (*CompareData) Funcs ¶
func (c *CompareData) Funcs() *CompareData
type CompareFuncData ¶
type CompareFuncData interface {
Funcs() *CompareData
}
type CompareOperator ¶
type CompareOperator int8
const ( CmpEQ CompareOperator = iota // equal CmpNE // not_equal CmpGT // greater CmpGE // greater_equal CmpLT // less CmpLE // less_equal )
func (CompareOperator) String ¶
func (i CompareOperator) String() string
type FilterOptions ¶
type FilterOptions struct {
NullSelection NullSelectionBehavior `compute:"null_selection_behavior"`
}
func (FilterOptions) TypeName ¶
func (FilterOptions) TypeName() string
type FilterState ¶
type FilterState = FilterOptions
type HashState ¶
type HashState interface { // Reset for another run Reset() error // Flush out accumulated results from last invocation Flush(*exec.ExecResult) error // FlushFinal flushes the accumulated results across all invocations // of calls. The kernel should not be used again until after // Reset() is called. FlushFinal(out *exec.ExecResult) error // GetDictionary returns the values (keys) accumulated in the dictionary // so far. GetDictionary() (arrow.ArrayData, error) ValueType() arrow.DataType // Append prepares the action for the given input (reserving appropriately // sized data structures, etc.) and visits the input with the Action Append(*exec.KernelCtx, *exec.ArraySpan) error Allocator() memory.Allocator }
type KleeneAndNotOpKernel ¶
type KleeneAndNotOpKernel struct{}
func (KleeneAndNotOpKernel) Call ¶
func (KleeneAndNotOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (KleeneAndNotOpKernel) CallScalarLeft ¶
func (KleeneAndNotOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
func (KleeneAndNotOpKernel) CallScalarRight ¶
func (KleeneAndNotOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error
type KleeneAndOpKernel ¶
type KleeneAndOpKernel struct {
// contains filtered or unexported fields
}
func (KleeneAndOpKernel) Call ¶
func (KleeneAndOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (KleeneAndOpKernel) CallScalarLeft ¶
func (KleeneAndOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
type KleeneOrOpKernel ¶
type KleeneOrOpKernel struct {
// contains filtered or unexported fields
}
func (KleeneOrOpKernel) Call ¶
func (KleeneOrOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (KleeneOrOpKernel) CallScalarLeft ¶
func (KleeneOrOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
type NullSelectionBehavior ¶
type NullSelectionBehavior int8
const ( DropNulls NullSelectionBehavior = iota EmitNulls )
type OrOpKernel ¶
type OrOpKernel struct {
// contains filtered or unexported fields
}
func (OrOpKernel) Call ¶
func (OrOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (OrOpKernel) CallScalarLeft ¶
func (OrOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
type RoundMode ¶
type RoundMode int8
const ( // Round to nearest integer less than or equal in magnitude (aka "floor") RoundDown RoundMode = iota // Round to nearest integer greater than or equal in magnitude (aka "ceil") RoundUp // Get integral part without fractional digits (aka "trunc") TowardsZero // Round negative values with DOWN and positive values with UP AwayFromZero // Round ties with DOWN (aka "round half towards negative infinity") HalfDown // Round ties with UP (aka "round half towards positive infinity") HalfUp // Round ties with TowardsZero (aka "round half away from infinity") HalfTowardsZero // Round ties with AwayFromZero (aka "round half towards infinity") HalfAwayFromZero // Round ties to nearest even integer HalfToEven // Round ties to nearest odd integer HalfToOdd )
type RoundOptions ¶
func (RoundOptions) TypeName ¶
func (RoundOptions) TypeName() string
type RoundState ¶
type RoundState struct { RoundOptions Pow10 float64 }
type RoundToMultipleOptions ¶
type RoundToMultipleOptions struct { // 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. Multiple scalar.Scalar // Mode is the rounding and tie-breaking mode Mode RoundMode }
func (RoundToMultipleOptions) TypeName ¶
func (RoundToMultipleOptions) TypeName() string
type RoundToMultipleState ¶
type RoundToMultipleState = RoundToMultipleOptions
type RunEndEncodeState ¶
func (RunEndEncodeState) TypeName ¶
func (RunEndEncodeState) TypeName() string
type RunEndsType ¶
type SelectionKernelData ¶
type SelectionKernelData struct { In exec.InputType Exec exec.ArrayKernelExec Chunked exec.ChunkedExec }
func GetVectorSelectionKernels ¶
func GetVectorSelectionKernels() (filterkernels, takeKernels []SelectionKernelData)
type SimpleBinaryKernel ¶
type TakeOptions ¶
type TakeOptions struct {
BoundsCheck bool
}
func (TakeOptions) TypeName ¶
func (TakeOptions) TypeName() string
type TakeState ¶
type TakeState = TakeOptions
type XorOpKernel ¶
type XorOpKernel struct {
// contains filtered or unexported fields
}
func (XorOpKernel) Call ¶
func (XorOpKernel) Call(ctx *exec.KernelCtx, left, right *exec.ArraySpan, out *exec.ExecResult) error
func (XorOpKernel) CallScalarLeft ¶
func (XorOpKernel) CallScalarLeft(ctx *exec.KernelCtx, left scalar.Scalar, right *exec.ArraySpan, out *exec.ExecResult) error
Source Files ¶
- base_arithmetic.go
- base_arithmetic_amd64.go
- base_arithmetic_avx2_amd64.go
- base_arithmetic_sse4_amd64.go
- boolean_cast.go
- cast.go
- cast_numeric.go
- cast_numeric_amd64.go
- cast_numeric_avx2_amd64.go
- cast_numeric_sse4_amd64.go
- cast_temporal.go
- compareoperator_string.go
- constant_factor.go
- constant_factor_amd64.go
- constant_factor_avx2_amd64.go
- constant_factor_sse4_amd64.go
- doc.go
- helpers.go
- numeric_cast.go
- rounding.go
- roundmode_string.go
- scalar_arithmetic.go
- scalar_boolean.go
- scalar_comparison_amd64.go
- scalar_comparison_avx2_amd64.go
- scalar_comparison_sse4_amd64.go
- scalar_comparisons.go
- string_casts.go
- types.go
- vector_hash.go
- vector_run_end_encode.go
- vector_selection.go