kernels

package
v11.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 22 Imported by: 0

Documentation

Overview

Package kernels defines all of the computation kernels for the compute library. This requires >= go1.18 since it utilizes Go generics.

Index

Constants

This section is empty.

Variables

View Source
var OutputFirstType = exec.NewComputedOutputType(func(_ *exec.KernelCtx, args []arrow.DataType) (arrow.DataType, error) {
	return args[0], nil
})
View Source
var OutputLastType = exec.NewComputedOutputType(func(_ *exec.KernelCtx, args []arrow.DataType) (arrow.DataType, error) {
	return args[len(args)-1], nil
})
View Source
var OutputResolveTemporal = exec.NewComputedOutputType(resolveTemporalOutput)

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 CanCastFromDict(id arrow.Type) bool

func CastBinaryToBinary

func CastBinaryToBinary[InOffsetsT, OutOffsetsT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastDecimal128ToInteger

func CastDecimal128ToInteger[T exec.IntTypes | exec.UintTypes](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastDecimal256ToInteger

func CastDecimal256ToInteger[T exec.IntTypes | exec.UintTypes](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastDecimalToDecimal

func CastDecimalToDecimal(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastDecimalToFloating

func CastDecimalToFloating[OutT constraints.Float](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastFloat32ToDecimal

func CastFloat32ToDecimal(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastFloat64ToDecimal

func CastFloat64ToDecimal(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastFloatingToFloating

func CastFloatingToFloating(_ *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastFloatingToInteger

func CastFloatingToInteger(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastFromNull

func CastFromNull(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

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 CastFsbToBinary[OffsetsT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastFsbToFsb

func CastFsbToFsb(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastIntToInt

func CastIntToInt(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastIntegerToDecimal

func CastIntegerToDecimal[OutT exec.DecimalTypes, Arg0 exec.IntTypes | exec.UintTypes](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func CastIntegerToFloating

func CastIntegerToFloating(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func ChunkedPrimitiveTake

func ChunkedPrimitiveTake(ctx *exec.KernelCtx, batch []*arrow.Chunked, out *exec.ExecResult) ([]*exec.ExecResult, error)

func ChunkedTakeSupported

func ChunkedTakeSupported(dt arrow.DataType) bool

func CompareKernels

func CompareKernels(op CompareOperator) []exec.ScalarKernel

func DenseUnionImpl

func DenseUnionImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error

func DoStaticCast

func DoStaticCast[InT, OutT numeric](in []InT, out []OutT)

func FSBImpl

func FSBImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error

func FSLImpl

func FSLImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error

func FilterBinary

func FilterBinary(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

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 GetCastToInteger[T exec.IntTypes | exec.UintTypes](outType arrow.DataType) []exec.ScalarKernel

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 GetShiftKernels

func GetShiftKernels(dir ShiftDir, checked bool) []exec.ScalarKernel

func GetSimpleRoundKernels

func GetSimpleRoundKernels(mode RoundMode) []exec.ScalarKernel

func GetTakeIndices

func GetTakeIndices(mem memory.Allocator, filter *exec.ArraySpan, nullSelect NullSelectionBehavior) (arrow.ArrayData, error)

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 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 ListImpl

func ListImpl[OffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error

func MaxDecimalDigitsForInt

func MaxDecimalDigitsForInt(id arrow.Type) (int32, 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 NullFilter(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func NullTake

func NullTake(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func NullToNullExec

func NullToNullExec(_ *exec.KernelCtx, _ *exec.ExecSpan, _ *exec.ExecResult) error

scalar kernel that ignores (assumed all-null inputs) and returns null

func OutputAllNull

func OutputAllNull(_ *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

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 PrimitiveFilter(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func PrimitiveTake

func PrimitiveTake(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func ResolveOutputFromOptions

func ResolveOutputFromOptions(ctx *exec.KernelCtx, _ []arrow.DataType) (arrow.DataType, error)

func ScalarBinary

func ScalarBinary[OutT, Arg0T, Arg1T exec.FixedWidthTypes](ops binaryOps[OutT, Arg0T, Arg1T]) exec.ArrayKernelExec

func ScalarBinaryBinaryArgsBoolOut

func ScalarBinaryBinaryArgsBoolOut(itrFn func(*exec.ArraySpan) exec.ArrayIter[[]byte], op binaryBinOp[bool]) exec.ArrayKernelExec

func ScalarBinaryBools

func ScalarBinaryBools(ops *binaryBoolOps) exec.ArrayKernelExec

func ScalarBinaryNotNull

func ScalarBinaryNotNull[OutT, Arg0T, Arg1T exec.FixedWidthTypes](op func(*exec.KernelCtx, Arg0T, Arg1T, *error) OutT) exec.ArrayKernelExec

func ScalarUnary

func ScalarUnary[OutT, Arg0T exec.FixedWidthTypes](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 exec.FixedWidthTypes since it is represented as a bitmap, not as a slice of bool.

func ScalarUnaryBoolArg

func ScalarUnaryBoolArg[OutT exec.FixedWidthTypes](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 exec.FixedWidthTypes](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 exec.FixedWidthTypes](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 exec.FixedWidthTypes, 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 ShiftTime

func ShiftTime[InT, OutT int32 | int64](ctx *exec.KernelCtx, op arrow.TimestampConvertOp, factor int64, input, output *exec.ArraySpan) error

func SimpleBinary

func SimpleBinary[K SimpleBinaryKernel](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func SimpleTemporalCast

func SimpleTemporalCast[I, O arrow.Duration | arrow.Time32 | arrow.Time64 | arrow.Timestamp](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

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 StringToTimestamp[OffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func StructImpl

func StructImpl(ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error

func SubtractDate32

func SubtractDate32(op ArithmeticOp) exec.ArrayKernelExec

func TakeExec

func TakeExec(impl selectionImplFn) exec.ArrayKernelExec

func TimestampToDate32

func TimestampToDate32(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func TimestampToDate64

func TimestampToDate64(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func TimestampToTime32

func TimestampToTime32(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

func TimestampToTime64

func TimestampToTime64(ctx *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

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 exec.FixedWidthTypes](val scalar.PrimitiveScalar) T

func VarBinaryImpl

func VarBinaryImpl[OffsetT int32 | int64](ctx *exec.KernelCtx, batch *exec.ExecSpan, outputLength int64, out *exec.ExecResult, fn selectionOutputFn) error

func ZeroCopyCastExec

func ZeroCopyCastExec(_ *exec.KernelCtx, batch *exec.ExecSpan, out *exec.ExecResult) error

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

func (AndOpKernel) CallScalarRight

func (AndOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, 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 BitwiseOp

type BitwiseOp int8
const (
	OpBitAnd BitwiseOp = iota
	OpBitOr
	OpBitXor
)

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 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

func (KleeneAndOpKernel) CallScalarRight

func (KleeneAndOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, 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

func (KleeneOrOpKernel) CallScalarRight

func (KleeneOrOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, 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

func (OrOpKernel) CallScalarRight

func (OrOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, 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
)

func (RoundMode) String

func (i RoundMode) String() string

type RoundOptions

type RoundOptions struct {
	NDigits int64
	Mode    RoundMode
}

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 SelectionKernelData

type SelectionKernelData struct {
	In      exec.InputType
	Exec    exec.ArrayKernelExec
	Chunked exec.ChunkedExec
}

func GetVectorSelectionKernels

func GetVectorSelectionKernels() (filterkernels, takeKernels []SelectionKernelData)

type ShiftDir

type ShiftDir int8
const (
	ShiftLeft ShiftDir = iota
	ShiftRight
)

type SimpleBinaryKernel

type SimpleBinaryKernel interface {
	CallScalarRight(*exec.KernelCtx, *exec.ArraySpan, scalar.Scalar, *exec.ExecResult) error
	// contains filtered or unexported methods
}

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

func (XorOpKernel) CallScalarRight

func (XorOpKernel) CallScalarRight(ctx *exec.KernelCtx, left *exec.ArraySpan, right scalar.Scalar, out *exec.ExecResult) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL