Documentation ¶
Index ¶
- Constants
- Variables
- func And(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Arith[T1 arithT, T2 arithT](vectors []*vector.Vector, proc *process.Process, typ types.Type, afn arithFn) (*vector.Vector, error)
- func BoolResult(isMatch bool, isReg bool) bool
- func Cast(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastBoolToNumeric[T constraints.Integer](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastBoolToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDateAsDatetime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDateAsString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDateAsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDateAsTimeStamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDatetimeAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDatetimeAsString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDatetimeAsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDatetimeAsTimeStamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128AsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128AsTimestamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToDecimal64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToFloat32(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToFloat64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToInt32(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal128ToUint64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64AsDecimal128(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64AsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64AsTimestamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64ToFloat32(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64ToFloat64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64ToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastDecimal64ToUint64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastFloat64ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastFloatAsDecimal128[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastFloatAsDecimal64[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastFloatToInt[T1 constraints.Float, T2 constraints.Integer](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastInt64ToUint64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastIntAsTime[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastIntAsTimestamp[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastLeftToRight[T1, T2 constraints.Integer | constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastNumValToBool[T constraints.Integer | constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSameType[T types.FixedSizeT](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecialIntToDecimal[T constraints.Integer](lv, rv *vector.Vector, ...) (*vector.Vector, error)
- func CastSpecialIntToDecimal64[T constraints.Integer](lv, rv *vector.Vector, ...) (*vector.Vector, error)
- func CastSpecials1Float[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials1Int[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials1Uint[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials2Float[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials2Int[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials2Uint[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials3(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials4[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecials4_64[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastSpecialu4[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastStringAsDecimal128(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastStringAsDecimal64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastStringToBool(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastStringToJson(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastStringToUuid(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimeAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimeAsDatetime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimeAsDecimal128(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimeAsDecimal64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimeAsNumeric[T constraints.Integer](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimeAsString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastTimestampAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastUIntAsTime[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastUIntAsTimestamp[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastUint64ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastUuidToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastVarcharAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastVarcharAsDatetime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastVarcharAsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CastVarcharAsTimestamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
- func CoalesceTypeCheckFn(inputTypes []types.T, _ []types.T, ret types.T) bool
- func CompareBytesEq(v1, v2 []byte, s1, s2 int32) bool
- func CompareBytesGe(v1, v2 []byte, s1, s2 int32) bool
- func CompareBytesGt(v1, v2 []byte, s1, s2 int32) bool
- func CompareBytesLe(v1, v2 []byte, s1, s2 int32) bool
- func CompareBytesLt(v1, v2 []byte, s1, s2 int32) bool
- func CompareBytesNe(v1, v2 []byte, s1, s2 int32) bool
- func CompareOrdered(vs []*vector.Vector, proc *process.Process, cfn compareFn) (*vector.Vector, error)
- func CompareString(vs []*vector.Vector, fn compStringFn, proc *process.Process) (*vector.Vector, error)
- func CompareUuid(vs []*vector.Vector, fn compUuidFn, proc *process.Process) (*vector.Vector, error)
- func CompareUuidEq(v1, v2 [16]byte) bool
- func CompareUuidGe(v1, v2 [16]byte) bool
- func CompareUuidGt(v1, v2 [16]byte) bool
- func CompareUuidLe(v1, v2 [16]byte) bool
- func CompareUuidLt(v1, v2 [16]byte) bool
- func CompareUuidNe(v1, v2 [16]byte) bool
- func CwTypeCheckFn(inputTypes []types.T, _ []types.T, ret types.T) bool
- func DivDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func DivDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func DivFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func EqDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func EqDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func EqGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func EqString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func EqUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GeDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GeDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GeGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GeString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GeUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GtDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GtDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GtGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GtString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func GtUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func HandleAndNullCol(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func HandleOrNullCol(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IfTypeCheckFn(inputTypes []types.T, _ []types.T, ret types.T) bool
- func IntegerDivFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Is(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsDecimal(t types.T) bool
- func IsFalse(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsFloat(t types.T) bool
- func IsInteger(t types.T) bool
- func IsNot(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsNotFalse(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsNotNull(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsNotTrue(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsNull(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func IsNumeric(t types.T) bool
- func IsTrue(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LeDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LeDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LeGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LeString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LeUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Like(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Logic(vectors []*vector.Vector, proc *process.Process, cfn logicFn, op logicType) (*vector.Vector, error)
- func LogicAnd(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LogicNot(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LogicOr(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LogicXor(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LtDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LtDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LtGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LtString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func LtUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MinusDatetime(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MinusDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MinusDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MinusFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MinusInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MinusUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func ModFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func ModInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func ModUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MultDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MultDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MultFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MultInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func MultUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NeDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NeDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NeGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NeString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NeUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Not(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NotRegMatch(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func NotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)
- func OpBitAndFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func OpBitLeftShiftFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func OpBitOrFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func OpBitRightShiftFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func OpBitXorFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Or(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func PlusDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func PlusDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func PlusFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func PlusInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func PlusUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func RegMatch(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func RegMatchWithALL(lv, rv []string, rs []bool, isReg bool) error
- func RegMatchWithAllConst(lv, rv []string, rs []bool, isReg bool) error
- func RegMatchWithLeftConst(lv, rv []string, rs []bool, isReg bool) error
- func RegMatchWithRightConst(lv, rv []string, rs []bool, isReg bool) error
- func ScalarAndNotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)
- func ScalarOrNotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)
- func ScalarXorNotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)
- func UnaryMinus[T constraints.Signed | constraints.Float](vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func UnaryMinusDecimal128(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func UnaryMinusDecimal64(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func UnaryTilde[T constraints.Integer](vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- func Xor(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)
- type IfRet
- type NormalType
- type OrderedValue
Constants ¶
const ( AND logicType = 0 OR logicType = 1 XOR logicType = 2 )
Variables ¶
var ( CaseWhenUint8 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[uint8](vs, proc, types.Type{Oid: types.T_uint8}) } CaseWhenUint16 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[uint16](vs, proc, types.Type{Oid: types.T_uint16}) } CaseWhenUint32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[uint32](vs, proc, types.Type{Oid: types.T_uint32}) } CaseWhenUint64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[uint64](vs, proc, types.Type{Oid: types.T_uint64}) } CaseWhenInt8 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[int8](vs, proc, types.Type{Oid: types.T_int8}) } CaseWhenInt16 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[int16](vs, proc, types.Type{Oid: types.T_int16}) } CaseWhenInt32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[int32](vs, proc, types.Type{Oid: types.T_int32}) } CaseWhenInt64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[int64](vs, proc, types.Type{Oid: types.T_int64}) } CaseWhenFloat32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[float32](vs, proc, types.Type{Oid: types.T_float32}) } CaseWhenFloat64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[float64](vs, proc, types.Type{Oid: types.T_float64}) } CaseWhenBool = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[bool](vs, proc, types.Type{Oid: types.T_bool}) } CaseWhenDate = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Date](vs, proc, types.Type{Oid: types.T_date}) } CaseWhenTime = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Time](vs, proc, types.Type{Oid: types.T_time}) } CaseWhenDateTime = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Datetime](vs, proc, types.Type{Oid: types.T_datetime}) } CaseWhenVarchar = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwString(vs, proc, types.Type{Oid: types.T_varchar}) } CaseWhenChar = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwString(vs, proc, types.Type{Oid: types.T_char}) } CaseWhenDecimal64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Decimal64](vs, proc, types.Type{Oid: types.T_decimal64}) } CaseWhenDecimal128 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Decimal128](vs, proc, types.Type{Oid: types.T_decimal128}) } CaseWhenTimestamp = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Timestamp](vs, proc, types.Type{Oid: types.T_timestamp}) } CaseWhenUuid = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwGeneral[types.Uuid](vs, proc, types.Type{Oid: types.T_uuid}) } CaseWhenBlob = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwString(vs, proc, types.Type{Oid: types.T_blob}) } CaseWhenText = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwString(vs, proc, types.Type{Oid: types.T_text}) } CaseWhenJson = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return cwString(vs, proc, types.Type{Oid: types.T_json}) } )
case-when operator only support format like that
` case when A = a1 then ... when A = a2 then ... when A = a3 then ... (else ...) `
format `case A when a1 then ... when a2 then ...` should be converted to required format.
var ( CoalesceUint8 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[uint8](vs, proc, types.Type{Oid: types.T_uint8}) } CoalesceUint16 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[uint16](vs, proc, types.Type{Oid: types.T_uint16}) } CoalesceUint32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[uint32](vs, proc, types.Type{Oid: types.T_uint32}) } CoalesceUint64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[uint64](vs, proc, types.Type{Oid: types.T_uint64}) } CoalesceInt8 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[int8](vs, proc, types.Type{Oid: types.T_int8}) } CoalesceInt16 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[int16](vs, proc, types.Type{Oid: types.T_int16}) } CoalesceInt32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[int32](vs, proc, types.Type{Oid: types.T_int32}) } CoalesceInt64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[int64](vs, proc, types.Type{Oid: types.T_int64}) } CoalesceFloat32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[float32](vs, proc, types.Type{Oid: types.T_float32}) } CoalesceFloat64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[float64](vs, proc, types.Type{Oid: types.T_float64}) } CoalesceBool = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[bool](vs, proc, types.Type{Oid: types.T_bool}) } CoalesceDate = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Date](vs, proc, types.Type{Oid: types.T_date}) } CoalesceTime = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Time](vs, proc, types.Type{Oid: types.T_time}) } CoalesceDateTime = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Datetime](vs, proc, types.Type{Oid: types.T_datetime}) } CoalesceVarchar = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceString(vs, proc, types.Type{Oid: types.T_varchar}) } CoalesceChar = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceString(vs, proc, types.Type{Oid: types.T_char}) } CoalesceJson = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceString(vs, proc, types.Type{Oid: types.T_json.ToType().Oid}) } CoalesceBlob = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceString(vs, proc, types.Type{Oid: types.T_blob.ToType().Oid}) } CoalesceText = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceString(vs, proc, types.Type{Oid: types.T_text.ToType().Oid}) } CoalesceDecimal64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Decimal64](vs, proc, types.Type{Oid: types.T_decimal64}) } CoalesceDecimal128 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Decimal128](vs, proc, types.Type{Oid: types.T_decimal128}) } CoalesceTimestamp = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Timestamp](vs, proc, types.Type{Oid: types.T_timestamp}) } CoalesceUuid = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return coalesceGeneral[types.Uuid](vs, proc, types.Type{Oid: types.T_uuid}) } )
var ( IfBool = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[bool](vs, proc, types.Type{Oid: types.T_bool}) } IfUint8 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[uint8](vs, proc, types.Type{Oid: types.T_uint8}) } IfUint16 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[uint16](vs, proc, types.Type{Oid: types.T_uint16}) } IfUint32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[uint32](vs, proc, types.Type{Oid: types.T_uint32}) } IfUint64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[uint64](vs, proc, types.Type{Oid: types.T_uint64}) } IfInt8 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[int8](vs, proc, types.Type{Oid: types.T_int8}) } IfInt16 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[int16](vs, proc, types.Type{Oid: types.T_int16}) } IfInt32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[int32](vs, proc, types.Type{Oid: types.T_int32}) } IfInt64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[int64](vs, proc, types.Type{Oid: types.T_int64}) } IfFloat32 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[float32](vs, proc, types.Type{Oid: types.T_float32}) } IfFloat64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[float64](vs, proc, types.Type{Oid: types.T_float64}) } IfDecimal64 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[types.Decimal64](vs, proc, types.Type{Oid: types.T_decimal64}) } IfDecimal128 = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[types.Decimal128](vs, proc, types.Type{Oid: types.T_decimal128}) } IfDate = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[types.Date](vs, proc, types.Type{Oid: types.T_date}) } IfTime = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[types.Time](vs, proc, types.Type{Oid: types.T_time}) } IfDateTime = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[types.Datetime](vs, proc, types.Type{Oid: types.T_datetime}) } IfVarchar = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifForString(vs, proc, types.Type{Oid: types.T_varchar}) } IfChar = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifForString(vs, proc, types.Type{Oid: types.T_char}) } IfTimestamp = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifGeneral[types.Timestamp](vs, proc, types.Type{Oid: types.T_timestamp}) } IfBlob = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifForString(vs, proc, types.Type{Oid: types.T_blob}) } IfText = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifForString(vs, proc, types.Type{Oid: types.T_text}) } IfJson = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifForString(vs, proc, types.Type{Oid: types.T_json}) } IfUuid = func(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error) { return ifForString(vs, proc, types.Type{Oid: types.T_uuid}) } )
If operator supported format like that
If(<boolean operator>, <value operator>, <value operator>)
Functions ¶
func Arith ¶ added in v0.6.0
func Arith[T1 arithT, T2 arithT](vectors []*vector.Vector, proc *process.Process, typ types.Type, afn arithFn) (*vector.Vector, error)
Generic T1 is the operand type and generic T2 is the return value type
func BoolResult ¶ added in v0.6.0
func CastBoolToNumeric ¶ added in v0.6.0
func CastBoolToString ¶
func CastDateAsDatetime ¶
func CastDateAsString ¶
func CastDateAsTime ¶ added in v0.6.0
func CastDateAsTimeStamp ¶
CastDateAsTimeStamp : Cast converts date to timestamp
func CastDatetimeAsDate ¶
CastDatetimeAsDate : convert datetime to date DateTime : high 44 bits stands for the seconds passed by, low 20 bits stands for the microseconds passed by
func CastDatetimeAsString ¶
func CastDatetimeAsTime ¶ added in v0.6.0
func CastDatetimeAsTimeStamp ¶
CastDatetimeAsTimeStamp : Cast converts datetime to timestamp
func CastDecimal128AsTime ¶ added in v0.6.0
func CastDecimal128ToDecimal64 ¶
func CastDecimal128ToDecimal64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
this cast function is too slow, and therefore only temporary, rewrite needed
func CastDecimal128ToFloat32 ¶
func CastDecimal128ToFloat64 ¶
func CastDecimal128ToInt32 ¶ added in v0.6.0
func CastDecimal128ToInt64 ¶
func CastDecimal128ToString ¶
func CastDecimal128ToUint64 ¶
func CastDecimal64AsDecimal128 ¶
func CastDecimal64AsDecimal128(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastDecimal64AsDecimal128 : Cast converts decimal64 to decimal128
func CastDecimal64AsTime ¶ added in v0.6.0
func CastDecimal64ToFloat32 ¶
func CastDecimal64ToFloat64 ¶
func CastDecimal64ToInt64 ¶
func CastDecimal64ToString ¶
func CastDecimal64ToUint64 ¶
func CastFloat64ToInt64 ¶
XXX can someone document why this one does not use the templated code? CastFloat64ToInt64 : cast float64 to int64
func CastFloatAsDecimal128 ¶
func CastFloatAsDecimal128[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
XXX This is a super slow function that we need to vectorwise.
func CastFloatAsDecimal64 ¶
func CastFloatAsDecimal64[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
XXX Super slow.
func CastFloatToInt ¶
func CastInt64ToUint64 ¶
CastInt64ToUint64 : cast int64 to uint64
func CastIntAsTime ¶ added in v0.6.0
func CastIntAsTimestamp ¶
func CastLeftToRight ¶
func CastLeftToRight[T1, T2 constraints.Integer | constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastLeftToRight : Cast handles conversions in the form of cast (left as right), where left and right are different types,
and both left and right are numeric types, Contains the following:
int8 -> (int16/int32/int64/uint8/uint16/uint32/uint64/float32/float64) int16 -> (int8/int32/int64/uint8/uint16/uint32/uint64/float32/float64) int32 -> (int8/int16/int64/uint8/uint16/uint32/uint64/float32/float64) int64 -> (int8/int16/int32/uint8/uint16/uint32/uint64/float32/float64) uint8 -> (int8/int16/int32/int64/uint16/uint32/uint64/float32/float64) uint16 -> (int8/int16/int32/int64/uint8/uint32/uint64/float32/float64) uint32 -> (int8/int16/int32/int64/uint8/uint16/uint64/float32/float64) uint64 -> (int8/int16/int32/int64/uint8/uint16/uint32/float32/float64)
func CastNumValToBool ¶
func CastSameType ¶
func CastSameType[T types.FixedSizeT](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSameType : Cast handles the same data type and is numeric , Contains the following: int8 -> int8, int16 -> int16, int32 -> int32, int64 -> int64, uint8 -> uint8, uint16 -> uint16, uint32 -> uint32, uint64 -> uint64, float32 -> float32, float64 -> float64,
func CastSpecialIntToDecimal ¶
func CastSpecialIntToDecimal[T constraints.Integer]( lv, rv *vector.Vector, i2d func(xs []T, rs []types.Decimal128, width, scale int32) ([]types.Decimal128, error), proc *process.Process) (*vector.Vector, error)
func CastSpecials1Float ¶
func CastSpecials1Float[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSpecials1Float : Cast converts string to floating point number,Contains the following: (char / varhcar / text) -> (float32 / float64)
func CastSpecials1Int ¶
func CastSpecials1Int[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSpecials1Int : Cast converts string to integer,Contains the following: (char / varhcar / text) -> (int8 / int16 / int32/ int64 / uint8 / uint16 / uint32 / uint64)
func CastSpecials1Uint ¶
func CastSpecials2Float ¶
func CastSpecials2Float[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSpecials2Float : Cast converts floating point number to string ,Contains the following: (float32/float64) -> (char / varhcar)
func CastSpecials2Int ¶
func CastSpecials2Int[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSpecials2Int : Cast converts integer to string,Contains the following: (int8 /int16/int32/int64) -> (char / varhcar / text)
func CastSpecials2Uint ¶ added in v0.6.0
func CastSpecials3 ¶
CastSpecials3 : Cast converts string to string ,Contains the following: char -> char char -> varhcar char -> blob varchar -> char varchar -> varhcar varchar -> blob blob -> char blob -> varchar blob -> blob we need to consider the visiblity of 0xXXXX, the rule is a little complex, please do that in the future the rule is, if src string len is larger than the dest string len, report an error for example: select cast('aaaaaaa' as char(1)); will report an error here. insert into col(varchar(1) values 'aaaaa', report an error for other cases, where col(varchar(1))='aaaaa', do not report error, just return empty result. maybe we can optimize this to false? sometimes, the dest len is 0, then do not report error here. maybe a bug and need to fix in the future?
func CastSpecials4 ¶
func CastSpecials4[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSpecials4 : Cast converts signed integer to decimal128 ,Contains the following: (int8/int16/int32/int64) to decimal128
func CastSpecials4_64 ¶
func CastSpecialu4 ¶
func CastSpecialu4[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)
CastSpecialu4 : Cast converts unsigned integer to decimal128 ,Contains the following: (uint8/uint16/uint32/uint64) to decimal128
func CastStringAsDecimal128 ¶
XXX I felt I have written this ten times, what is going on? CastStringAsDecimal128 : onverts char/varchar as decimal128
func CastStringAsDecimal64 ¶
CastStringAsDecimal64 : onverts char/varchar/text as decimal64
func CastStringToBool ¶
func CastStringToJson ¶ added in v0.6.0
func CastStringToUuid ¶ added in v0.6.0
---------------------------------------------uuid cast---------------------------------------------------------------
func CastTimeAsDate ¶ added in v0.6.0
func CastTimeAsDatetime ¶ added in v0.6.0
func CastTimeAsDecimal128 ¶ added in v0.6.0
func CastTimeAsDecimal64 ¶ added in v0.6.0
func CastTimeAsNumeric ¶ added in v0.6.0
func CastTimeAsString ¶ added in v0.6.0
func CastTimestampAsDate ¶
func CastUIntAsTime ¶ added in v0.6.0
func CastUIntAsTimestamp ¶
func CastUint64ToInt64 ¶
CastUint64ToInt64 : cast uint64 to int64
func CastUuidToString ¶ added in v0.6.0
func CastVarcharAsDate ¶
CastVarcharAsDate : Cast converts varchar to date type
func CastVarcharAsDatetime ¶
CastVarcharAsDatetime : Cast converts varchar to datetime type
func CastVarcharAsTime ¶ added in v0.6.0
func CastVarcharAsTimestamp ¶
CastVarcharAsTimestamp : Cast converts varchar to timestamp type
func CoalesceTypeCheckFn ¶ added in v0.6.0
CoalesceTypeCheckFn is type check function for coalesce operator
func CompareBytesEq ¶ added in v0.5.1
func CompareBytesGe ¶ added in v0.5.1
func CompareBytesGt ¶ added in v0.5.1
func CompareBytesLe ¶ added in v0.5.1
func CompareBytesLt ¶ added in v0.5.1
func CompareBytesNe ¶ added in v0.5.1
func CompareOrdered ¶ added in v0.5.1
func CompareString ¶ added in v0.5.1
func CompareUuid ¶ added in v0.6.0
func CompareUuidEq ¶ added in v0.6.0
func CompareUuidGe ¶ added in v0.6.0
func CompareUuidGt ¶ added in v0.6.0
func CompareUuidLe ¶ added in v0.6.0
func CompareUuidLt ¶ added in v0.6.0
func CompareUuidNe ¶ added in v0.6.0
func CwTypeCheckFn ¶
CwTypeCheckFn is type check function for case-when operator
func DivDecimal128 ¶
func DivDecimal64 ¶
func DivFloat ¶ added in v0.6.0
func DivFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
Division operation
func EqDecimal128 ¶
func EqDecimal64 ¶
func GeDecimal128 ¶
func GeDecimal64 ¶
func GtDecimal128 ¶
func GtDecimal64 ¶
func HandleAndNullCol ¶
func HandleOrNullCol ¶
func IntegerDivFloat ¶ added in v0.6.0
func IntegerDivFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
Integer division operation
func IsInteger ¶ added in v0.6.0
---------------------------------------------------------------------------------------------------------------------- IsInteger return true if the types.T is integer type
func IsNotFalse ¶ added in v0.6.0
func LeDecimal128 ¶
func LeDecimal64 ¶
func LtDecimal128 ¶
func LtDecimal64 ¶
func MinusDatetime ¶ added in v0.6.0
func MinusDecimal128 ¶
func MinusDecimal64 ¶
func MinusFloat ¶ added in v0.6.0
func MinusUint ¶ added in v0.6.0
func MinusUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
Subtraction operation
func ModUint ¶ added in v0.6.0
func ModUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
mod operation
func MultDecimal128 ¶
func MultDecimal64 ¶
func MultUint ¶ added in v0.6.0
func MultUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
Multiplication operation
func NeDecimal128 ¶
func NeDecimal64 ¶
func NotRegMatch ¶ added in v0.6.0
func OpBitAndFun ¶ added in v0.6.0
func OpBitLeftShiftFun ¶ added in v0.6.0
func OpBitOrFun ¶ added in v0.6.0
func OpBitRightShiftFun ¶ added in v0.6.0
func OpBitXorFun ¶ added in v0.6.0
func PlusDecimal128 ¶
func PlusDecimal64 ¶
func PlusUint ¶ added in v0.6.0
func PlusUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)
Addition operation
func RegMatchWithALL ¶ added in v0.6.0
func RegMatchWithAllConst ¶ added in v0.6.0
func RegMatchWithLeftConst ¶ added in v0.6.0
func RegMatchWithRightConst ¶ added in v0.6.0
func ScalarAndNotScalar ¶
func ScalarOrNotScalar ¶
func ScalarXorNotScalar ¶
func UnaryMinus ¶
func UnaryMinusDecimal128 ¶
func UnaryMinusDecimal64 ¶
func UnaryTilde ¶ added in v0.6.0
Types ¶
type IfRet ¶
type IfRet interface { constraints.Integer | constraints.Float | bool | types.Date | types.Datetime | types.Decimal64 | types.Decimal128 | types.Timestamp }