operator

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AND logicType = 0
	OR  logicType = 1
	XOR logicType = 2
)

Variables

View Source
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.

View Source
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})
	}
)
View Source
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 And

func And(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

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 BoolResult(isMatch bool, isReg bool) bool

func Cast

func Cast(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastBoolToNumeric added in v0.6.0

func CastBoolToNumeric[T constraints.Integer](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastBoolToString

func CastBoolToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDateAsDatetime

func CastDateAsDatetime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDateAsString

func CastDateAsString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDateAsTime added in v0.6.0

func CastDateAsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDateAsTimeStamp

func CastDateAsTimeStamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastDateAsTimeStamp : Cast converts date to timestamp

func CastDatetimeAsDate

func CastDatetimeAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastDatetimeAsString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDatetimeAsTime added in v0.6.0

func CastDatetimeAsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDatetimeAsTimeStamp

func CastDatetimeAsTimeStamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastDatetimeAsTimeStamp : Cast converts datetime to timestamp

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 CastDecimal64AsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal64AsTimestamp

func CastDecimal64AsTimestamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal64ToFloat32

func CastDecimal64ToFloat32(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal64ToFloat64

func CastDecimal64ToFloat64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal64ToInt64

func CastDecimal64ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal64ToString

func CastDecimal64ToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal64ToUint64

func CastDecimal64ToUint64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128AsTime added in v0.6.0

func CastDecimal128AsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128AsTimestamp

func CastDecimal128AsTimestamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastDecimal128ToFloat32(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128ToFloat64

func CastDecimal128ToFloat64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128ToInt32 added in v0.6.0

func CastDecimal128ToInt32(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128ToInt64

func CastDecimal128ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128ToString

func CastDecimal128ToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastDecimal128ToUint64

func CastDecimal128ToUint64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastFloat64ToInt64

func CastFloat64ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

XXX can someone document why this one does not use the templated code? CastFloat64ToInt64 : cast float64 to int64

func CastFloatAsDecimal64

func CastFloatAsDecimal64[T constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

XXX Super slow.

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 CastFloatToInt

func CastFloatToInt[T1 constraints.Float, T2 constraints.Integer](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastInt64ToUint64

func CastInt64ToUint64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastInt64ToUint64 : cast int64 to uint64

func CastIntAsTime added in v0.6.0

func CastIntAsTime[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastIntAsTimestamp

func CastIntAsTimestamp[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastNumValToBool[T constraints.Integer | constraints.Float](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastSpecialIntToDecimal64

func CastSpecialIntToDecimal64[T constraints.Integer](
	lv, rv *vector.Vector,
	i2d func(xs []T, rs []types.Decimal64, width, scale int32) ([]types.Decimal64, 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 CastSpecials1Uint[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastSpecials2Uint[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastSpecials3

func CastSpecials3(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastSpecials4_64[T constraints.Signed](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

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 CastStringAsDecimal64

func CastStringAsDecimal64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastStringAsDecimal64 : onverts char/varchar/text as decimal64

func CastStringAsDecimal128

func CastStringAsDecimal128(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

XXX I felt I have written this ten times, what is going on? CastStringAsDecimal128 : onverts char/varchar as decimal128

func CastStringToBool

func CastStringToBool(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastStringToJson added in v0.6.0

func CastStringToJson(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastStringToUuid added in v0.6.0

func CastStringToUuid(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

---------------------------------------------uuid cast---------------------------------------------------------------

func CastTimeAsDate added in v0.6.0

func CastTimeAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastTimeAsDatetime added in v0.6.0

func CastTimeAsDatetime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastTimeAsDecimal64 added in v0.6.0

func CastTimeAsDecimal64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastTimeAsDecimal128 added in v0.6.0

func CastTimeAsDecimal128(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastTimeAsNumeric added in v0.6.0

func CastTimeAsNumeric[T constraints.Integer](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastTimeAsString added in v0.6.0

func CastTimeAsString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastTimestampAsDate

func CastTimestampAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastUIntAsTime added in v0.6.0

func CastUIntAsTime[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastUIntAsTimestamp

func CastUIntAsTimestamp[T constraints.Unsigned](lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastUint64ToInt64

func CastUint64ToInt64(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastUint64ToInt64 : cast uint64 to int64

func CastUuidToString added in v0.6.0

func CastUuidToString(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastVarcharAsDate

func CastVarcharAsDate(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastVarcharAsDate : Cast converts varchar to date type

func CastVarcharAsDatetime

func CastVarcharAsDatetime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastVarcharAsDatetime : Cast converts varchar to datetime type

func CastVarcharAsTime added in v0.6.0

func CastVarcharAsTime(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

func CastVarcharAsTimestamp

func CastVarcharAsTimestamp(lv, rv *vector.Vector, proc *process.Process) (*vector.Vector, error)

CastVarcharAsTimestamp : Cast converts varchar to timestamp type

func CoalesceTypeCheckFn added in v0.6.0

func CoalesceTypeCheckFn(inputTypes []types.T, _ []types.T, ret types.T) bool

CoalesceTypeCheckFn is type check function for coalesce operator

func CompareBytesEq added in v0.5.1

func CompareBytesEq(v1, v2 []byte, s1, s2 int32) bool

func CompareBytesGe added in v0.5.1

func CompareBytesGe(v1, v2 []byte, s1, s2 int32) bool

func CompareBytesGt added in v0.5.1

func CompareBytesGt(v1, v2 []byte, s1, s2 int32) bool

func CompareBytesLe added in v0.5.1

func CompareBytesLe(v1, v2 []byte, s1, s2 int32) bool

func CompareBytesLt added in v0.5.1

func CompareBytesLt(v1, v2 []byte, s1, s2 int32) bool

func CompareBytesNe added in v0.5.1

func CompareBytesNe(v1, v2 []byte, s1, s2 int32) bool

func CompareOrdered added in v0.5.1

func CompareOrdered(vs []*vector.Vector, proc *process.Process, cfn compareFn) (*vector.Vector, error)

func CompareString added in v0.5.1

func CompareString(vs []*vector.Vector, fn compStringFn, proc *process.Process) (*vector.Vector, error)

func CompareUuid added in v0.6.0

func CompareUuid(vs []*vector.Vector, fn compUuidFn, proc *process.Process) (*vector.Vector, error)

func CompareUuidEq added in v0.6.0

func CompareUuidEq(v1, v2 [16]byte) bool

func CompareUuidGe added in v0.6.0

func CompareUuidGe(v1, v2 [16]byte) bool

func CompareUuidGt added in v0.6.0

func CompareUuidGt(v1, v2 [16]byte) bool

func CompareUuidLe added in v0.6.0

func CompareUuidLe(v1, v2 [16]byte) bool

func CompareUuidLt added in v0.6.0

func CompareUuidLt(v1, v2 [16]byte) bool

func CompareUuidNe added in v0.6.0

func CompareUuidNe(v1, v2 [16]byte) bool

func CwTypeCheckFn

func CwTypeCheckFn(inputTypes []types.T, _ []types.T, ret types.T) bool

CwTypeCheckFn is type check function for case-when operator

func DivDecimal64

func DivDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func DivDecimal128

func DivDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func DivFloat added in v0.6.0

func DivFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Division operation

func EqDecimal64

func EqDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func EqDecimal128

func EqDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func EqGeneral

func EqGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Equal compare operator

func EqString

func EqString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func EqUuid added in v0.6.0

func EqUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GeDecimal64

func GeDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GeDecimal128

func GeDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GeGeneral

func GeGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Great equal operator

func GeString

func GeString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GeUuid added in v0.6.0

func GeUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GtDecimal64

func GtDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GtDecimal128

func GtDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GtGeneral

func GtGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Great than operator

func GtString

func GtString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func GtUuid added in v0.6.0

func GtUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func HandleAndNullCol

func HandleAndNullCol(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func HandleOrNullCol

func HandleOrNullCol(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IfTypeCheckFn

func IfTypeCheckFn(inputTypes []types.T, _ []types.T, ret types.T) bool

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 Is

func Is(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsDecimal added in v0.6.0

func IsDecimal(t types.T) bool

IsDecimal: return true if the types.T is decimal64 or decimal128

func IsFalse added in v0.6.0

func IsFalse(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsFloat added in v0.6.0

func IsFloat(t types.T) bool

IsFloat: return true if the types.T is floating Point Types

func IsInteger added in v0.6.0

func IsInteger(t types.T) bool

---------------------------------------------------------------------------------------------------------------------- IsInteger return true if the types.T is integer type

func IsNot

func IsNot(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsNotFalse added in v0.6.0

func IsNotFalse(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsNotNull

func IsNotNull(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsNotTrue added in v0.6.0

func IsNotTrue(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsNull

func IsNull(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func IsNumeric added in v0.6.0

func IsNumeric(t types.T) bool

IsNumeric: return true if the types.T is numbric type

func IsTrue added in v0.6.0

func IsTrue(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LeDecimal64

func LeDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LeDecimal128

func LeDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LeGeneral

func LeGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

less equal operator

func LeString

func LeString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LeUuid added in v0.6.0

func LeUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func Like

func Like(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func Logic added in v0.6.0

func Logic(vectors []*vector.Vector, proc *process.Process, cfn logicFn, op logicType) (*vector.Vector, error)

func LogicAnd added in v0.6.0

func LogicAnd(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LogicNot added in v0.6.0

func LogicNot(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LogicOr added in v0.6.0

func LogicOr(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LogicXor added in v0.6.0

func LogicXor(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LtDecimal64

func LtDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LtDecimal128

func LtDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LtGeneral

func LtGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

less than operator

func LtString

func LtString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func LtUuid added in v0.6.0

func LtUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MinusDatetime added in v0.6.0

func MinusDatetime(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MinusDecimal64

func MinusDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MinusDecimal128

func MinusDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MinusFloat added in v0.6.0

func MinusFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MinusInt added in v0.6.0

func MinusInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MinusUint added in v0.6.0

func MinusUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Subtraction operation

func ModFloat

func ModFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func ModInt

func ModInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func ModUint added in v0.6.0

func ModUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

mod operation

func MultDecimal64

func MultDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MultDecimal128

func MultDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MultFloat added in v0.6.0

func MultFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MultInt added in v0.6.0

func MultInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func MultUint added in v0.6.0

func MultUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Multiplication operation

func NeDecimal64

func NeDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func NeDecimal128

func NeDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func NeGeneral

func NeGeneral[T compareT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Not Equal compare operator

func NeString

func NeString(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func NeUuid added in v0.6.0

func NeUuid(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func Not

func Not(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func NotRegMatch added in v0.6.0

func NotRegMatch(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func NotScalar

func NotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)

func OpBitAndFun added in v0.6.0

func OpBitAndFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func OpBitLeftShiftFun added in v0.6.0

func OpBitLeftShiftFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func OpBitOrFun added in v0.6.0

func OpBitOrFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func OpBitRightShiftFun added in v0.6.0

func OpBitRightShiftFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func OpBitXorFun added in v0.6.0

func OpBitXorFun[T opBitT](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func Or

func Or(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func PlusDecimal64

func PlusDecimal64(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func PlusDecimal128

func PlusDecimal128(args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func PlusFloat added in v0.6.0

func PlusFloat[T constraints.Float](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func PlusInt added in v0.6.0

func PlusInt[T constraints.Signed](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func PlusUint added in v0.6.0

func PlusUint[T constraints.Unsigned](args []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Addition operation

func RegMatch added in v0.6.0

func RegMatch(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func RegMatchWithALL added in v0.6.0

func RegMatchWithALL(lv, rv []string, rs []bool, isReg bool) error

func RegMatchWithAllConst added in v0.6.0

func RegMatchWithAllConst(lv, rv []string, rs []bool, isReg bool) error

func RegMatchWithLeftConst added in v0.6.0

func RegMatchWithLeftConst(lv, rv []string, rs []bool, isReg bool) error

func RegMatchWithRightConst added in v0.6.0

func RegMatchWithRightConst(lv, rv []string, rs []bool, isReg bool) error

func ScalarAndNotScalar

func ScalarAndNotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)

func ScalarOrNotScalar

func ScalarOrNotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)

func ScalarXorNotScalar

func ScalarXorNotScalar(_, nsv *vector.Vector, col1, col2 []bool, proc *process.Process) (*vector.Vector, error)

func UnaryMinus

func UnaryMinus[T constraints.Signed | constraints.Float](vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func UnaryMinusDecimal64

func UnaryMinusDecimal64(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func UnaryMinusDecimal128

func UnaryMinusDecimal128(vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func UnaryTilde added in v0.6.0

func UnaryTilde[T constraints.Integer](vectors []*vector.Vector, proc *process.Process) (*vector.Vector, error)

func Xor

func Xor(vs []*vector.Vector, proc *process.Process) (*vector.Vector, error)

Types

Jump to

Keyboard shortcuts

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