binary

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Int16ToInt8   = NumericToNumeric[int16, int8]
	Int32ToInt8   = NumericToNumeric[int32, int8]
	Int64ToInt8   = NumericToNumeric[int64, int8]
	Uint8ToInt8   = NumericToNumeric[uint8, int8]
	Uint16ToInt8  = NumericToNumeric[uint16, int8]
	Uint32ToInt8  = NumericToNumeric[uint32, int8]
	Uint64ToInt8  = NumericToNumeric[uint64, int8]
	Float32ToInt8 = FloatToIntWithoutError[float32, int8]
	Float64ToInt8 = FloatToIntWithoutError[float64, int8]

	Int8ToInt16    = NumericToNumeric[int8, int16]
	Int32ToInt16   = NumericToNumeric[int32, int16]
	Int64ToInt16   = NumericToNumeric[int64, int16]
	Uint8ToInt16   = NumericToNumeric[uint8, int16]
	Uint16ToInt16  = NumericToNumeric[uint16, int16]
	Uint32ToInt16  = NumericToNumeric[uint32, int16]
	Uint64ToInt16  = NumericToNumeric[uint64, int16]
	Float32ToInt16 = FloatToIntWithoutError[float32, int16]
	Float64ToInt16 = FloatToIntWithoutError[float64, int16]

	Int8ToInt32    = NumericToNumeric[int8, int32]
	Int16ToInt32   = NumericToNumeric[int16, int32]
	Int64ToInt32   = NumericToNumeric[int64, int32]
	Uint8ToInt32   = NumericToNumeric[uint8, int32]
	Uint16ToInt32  = NumericToNumeric[uint16, int32]
	Uint32ToInt32  = NumericToNumeric[uint32, int32]
	Uint64ToInt32  = NumericToNumeric[uint64, int32]
	Float32ToInt32 = NumericToNumeric[float32, int32]
	Float64ToInt32 = NumericToNumeric[float64, int32]

	Int8ToInt64    = NumericToNumeric[int8, int64]
	Int16ToInt64   = NumericToNumeric[int16, int64]
	Int32ToInt64   = NumericToNumeric[int32, int64]
	Uint8ToInt64   = NumericToNumeric[uint8, int64]
	Uint16ToInt64  = NumericToNumeric[uint16, int64]
	Uint32ToInt64  = NumericToNumeric[uint32, int64]
	Uint64ToInt64  = uint64ToInt64 // we handle overflow error in this function
	Float32ToInt64 = FloatToIntWithoutError[float32, int64]
	Float64ToInt64 = float64ToInt64

	Int8ToUint8    = NumericToNumeric[int8, uint8]
	Int16ToUint8   = NumericToNumeric[int16, uint8]
	Int32ToUint8   = NumericToNumeric[int32, uint8]
	Int64ToUint8   = NumericToNumeric[int64, uint8]
	Uint16ToUint8  = NumericToNumeric[uint16, uint8]
	Uint32ToUint8  = NumericToNumeric[uint32, uint8]
	Uint64ToUint8  = NumericToNumeric[uint64, uint8]
	Float32ToUint8 = FloatToIntWithoutError[float32, uint8]
	Float64ToUint8 = FloatToIntWithoutError[float64, uint8]

	Int8ToUint16    = NumericToNumeric[int8, uint16]
	Int16ToUint16   = NumericToNumeric[int16, uint16]
	Int32ToUint16   = NumericToNumeric[int32, uint16]
	Int64ToUint16   = NumericToNumeric[int64, uint16]
	Uint8ToUint16   = NumericToNumeric[uint8, uint16]
	Uint32ToUint16  = NumericToNumeric[uint32, uint16]
	Uint64ToUint16  = NumericToNumeric[uint64, uint16]
	Float32ToUint16 = NumericToNumeric[float32, uint16]
	Float64ToUint16 = NumericToNumeric[float64, uint16]

	Int8ToUint32    = NumericToNumeric[int8, uint32]
	Int16ToUint32   = NumericToNumeric[int16, uint32]
	Int32ToUint32   = NumericToNumeric[int32, uint32]
	Int64ToUint32   = NumericToNumeric[int64, uint32]
	Uint8ToUint32   = NumericToNumeric[uint8, uint32]
	Uint16ToUint32  = NumericToNumeric[uint16, uint32]
	Uint64ToUint32  = NumericToNumeric[uint64, uint32]
	Float32ToUint32 = FloatToIntWithoutError[float32, uint32]
	Float64ToUint32 = FloatToIntWithoutError[float64, uint32]

	Int8ToUint64    = NumericToNumeric[int8, uint64]
	Int16ToUint64   = NumericToNumeric[int16, uint64]
	Int32ToUint64   = NumericToNumeric[int32, uint64]
	Int64ToUint64   = int64ToUint64
	Uint8ToUint64   = NumericToNumeric[uint8, uint64]
	Uint16ToUint64  = NumericToNumeric[uint16, uint64]
	Uint32ToUint64  = NumericToNumeric[uint32, uint64]
	Float32ToUint64 = FloatToIntWithoutError[float32, uint64]
	Float64ToUint64 = FloatToIntWithoutError[float64, uint64]

	Int8ToFloat32    = NumericToNumeric[int8, float32]
	Int16ToFloat32   = NumericToNumeric[int16, float32]
	Int32ToFloat32   = NumericToNumeric[int32, float32]
	Int64ToFloat32   = NumericToNumeric[int64, float32]
	Uint8ToFloat32   = NumericToNumeric[uint8, float32]
	Uint16ToFloat32  = NumericToNumeric[uint16, float32]
	Uint32ToFloat32  = NumericToNumeric[uint32, float32]
	Uint64ToFloat32  = NumericToNumeric[uint64, float32]
	Float64ToFloat32 = NumericToNumeric[float64, float32]

	Int8ToFloat64    = NumericToNumeric[int8, float64]
	Int16ToFloat64   = NumericToNumeric[int16, float64]
	Int32ToFloat64   = NumericToNumeric[int32, float64]
	Int64ToFloat64   = NumericToNumeric[int64, float64]
	Uint8ToFloat64   = NumericToNumeric[uint8, float64]
	Uint16ToFloat64  = NumericToNumeric[uint16, float64]
	Uint32ToFloat64  = NumericToNumeric[uint32, float64]
	Uint64ToFloat64  = NumericToNumeric[uint64, float64]
	Float32ToFloat64 = NumericToNumeric[float32, float64]

	BytesToInt8    = BytesToInt[int8]
	Int8ToBytes    = IntToBytes[int8]
	BytesToInt16   = BytesToInt[int16]
	Int16ToBytes   = IntToBytes[int16]
	BytesToInt32   = BytesToInt[int32]
	Int32ToBytes   = IntToBytes[int32]
	BytesToInt64   = BytesToInt[int64]
	Int64ToBytes   = IntToBytes[int64]
	BytesToUint8   = BytesToUint[uint8]
	Uint8ToBytes   = IntToBytes[uint8]
	BytesToUint16  = BytesToUint[uint16]
	Uint16ToBytes  = IntToBytes[uint16]
	BytesToUint32  = BytesToUint[uint32]
	Uint32ToBytes  = IntToBytes[uint32]
	BytesToUint64  = BytesToUint[uint64]
	Uint64ToBytes  = IntToBytes[uint64]
	BytesToFloat32 = BytesToFloat[float32]
	Float32ToBytes = FloatToBytes[float32]
	BytesToFloat64 = BytesToFloat[float64]
	Float64ToBytes = FloatToBytes[float64]

	Decimal64ToDecimal128 = decimal64ToDecimal128Pure

	Int8ToDecimal128   = IntToDecimal128[int8]
	Int16ToDecimal128  = IntToDecimal128[int16]
	Int32ToDecimal128  = IntToDecimal128[int32]
	Int64ToDecimal128  = IntToDecimal128[int64]
	Uint8ToDecimal128  = UintToDecimal128[uint8]
	Uint16ToDecimal128 = UintToDecimal128[uint16]
	Uint32ToDecimal128 = UintToDecimal128[uint32]
	Uint64ToDecimal128 = UintToDecimal128[uint64]

	TimestampToDatetime = timestampToDatetime
	DatetimeToTimestamp = datetimeToTimestamp
	DateToTimestamp     = dateToTimestamp
	TimestampToVarchar  = timestampToVarchar
	BoolToBytes         = boolToBytes
	DateToBytes         = dateToBytes
	DateToDatetime      = dateToDateTime
	DateTimeToBytes     = datetimeToBytes
	DateTimeToDate      = datetimeToDate
)

Functions

func BytesToFloat

func BytesToFloat[T constraints.Float](xs *types.Bytes, rs []T, isEmptyStringOrNull ...[]int) ([]T, error)

func BytesToInt

func BytesToInt[T constraints.Signed](xs *types.Bytes, rs []T) ([]T, error)

func BytesToUint

func BytesToUint[T constraints.Unsigned](xs *types.Bytes, rs []T) ([]T, error)

func Decimal128ToBytes

func Decimal128ToBytes(xs []types.Decimal128, rs *types.Bytes, scale int32) (*types.Bytes, error)

func Decimal128ToDecimal64

func Decimal128ToDecimal64(xs []types.Decimal128, xsScale int32, ysPrecision, ysScale int32, rs []types.Decimal64) ([]types.Decimal64, error)

the scale of decimal128 is guaranteed to be less than 18 this cast function is too slow, and therefore only temporary, rewrite needed

func Decimal128ToFloat32

func Decimal128ToFloat32(xs []types.Decimal128, scale int32, rs []float32) ([]float32, error)

func Decimal128ToFloat64

func Decimal128ToFloat64(xs []types.Decimal128, scale int32, rs []float64) ([]float64, error)

func Decimal128ToInt64

func Decimal128ToInt64(xs []types.Decimal128, scale int32, rs []int64) ([]int64, error)

func Decimal128ToTimestamp

func Decimal128ToTimestamp(xs []types.Decimal128, precision int32, scale int32, rs []types.Timestamp) ([]types.Timestamp, error)

func Decimal128ToUint64

func Decimal128ToUint64(xs []types.Decimal128, scale int32, rs []uint64) ([]uint64, error)

func Decimal64ToBytes

func Decimal64ToBytes(xs []types.Decimal64, rs *types.Bytes, scale int32) (*types.Bytes, error)

func Decimal64ToFloat32

func Decimal64ToFloat32(xs []types.Decimal64, scale int32, rs []float32) ([]float32, error)

func Decimal64ToFloat64

func Decimal64ToFloat64(xs []types.Decimal64, scale int32, rs []float64) ([]float64, error)

func Decimal64ToInt64

func Decimal64ToInt64(xs []types.Decimal64, scale int32, rs []int64) ([]int64, error)

func Decimal64ToTimestamp

func Decimal64ToTimestamp(xs []types.Decimal64, precision int32, scale int32, rs []types.Timestamp) ([]types.Timestamp, error)

func Decimal64ToUint64

func Decimal64ToUint64(xs []types.Decimal64, scale int32, rs []uint64) ([]uint64, error)

func Endswith

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

func ExtractFromDate

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

func ExtractFromDatetime

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

func FindInSet

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

func FloatToBytes

func FloatToBytes[T constraints.Float](xs []T, rs *types.Bytes) (*types.Bytes, error)

func FloatToIntWithoutError

func FloatToIntWithoutError[T1 constraints.Float, T2 constraints.Integer](xs []T1, rs []T2) ([]T2, error)

func IntToBytes

func IntToBytes[T constraints.Integer](xs []T, rs *types.Bytes) (*types.Bytes, error)

func IntToDecimal128

func IntToDecimal128[T constraints.Integer](xs []T, rs []types.Decimal128) ([]types.Decimal128, error)

func IntToDecimal64

func IntToDecimal64[T constraints.Integer](xs []T, rs []types.Decimal64, scale int64) ([]types.Decimal64, error)

func NumericToBool

func NumericToBool[T constraints.Integer | constraints.Float](xs []T, rs []bool) ([]bool, error)

func NumericToNumeric

func NumericToNumeric[T1, T2 constraints.Integer | constraints.Float](xs []T1, rs []T2) ([]T2, error)

func NumericToTimestamp

func NumericToTimestamp[T constraints.Integer](xs []T, rs []types.Timestamp) ([]types.Timestamp, error)

func Power

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

func Startswith

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

func ToDate

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

func ToDateInputBytes

func ToDateInputBytes(inputBytes *types.Bytes, format string, inputNsp *nulls.Nulls, resultBytes *types.Bytes) (*types.Bytes, *nulls.Nulls, error)

func UintToDecimal128

func UintToDecimal128[T constraints.Integer](xs []T, rs []types.Decimal128) ([]types.Decimal128, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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