function

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Distinct     = 0x8000000000000000
	DistinctMask = 0x7FFFFFFFFFFFFFFF
)
View Source
const (
	EQUAL       = iota // =
	NOT_EQUAL          // <>
	GREAT_THAN         // >
	GREAT_EQUAL        // >=
	LESS_THAN          // <
	LESS_EQUAL         // <=
	BETWEEN
	UNARY_PLUS  // UNARY_PLUS +
	UNARY_MINUS // UNARY_MINUS -
	UNARY_TILDE // UNARY_TILDE ~
	PLUS        // +
	MINUS       // -
	MULTI       // *
	DIV         // /
	INTEGER_DIV // Div
	MOD         // %
	CONCAT      // ||
	AND
	OR
	XOR
	NOT
	CAST
	BIT_CAST
	IS
	ISNOT
	ISNULL
	ISNOTNULL
	ISTRUE
	ISNOTTRUE
	ISFALSE
	ISNOTFALSE
	ISEMPTY
	NOT_IN_ROWS
	OP_BIT_AND         // &
	OP_BIT_OR          // |
	OP_BIT_XOR         // ^
	OP_BIT_SHIFT_LEFT  // <<
	OP_BIT_SHIFT_RIGHT // >>

	ABS
	ACOS
	ADDDATE
	ADDTIME
	AES_DECRYPT
	AES_ENCRYPT
	ANY_VALUE
	APPROX_COUNT
	ARRAY_AGG
	ARRAY_APPEND
	ARRAY_CAT
	ARRAY_CONTAINS
	ARRAY_POSITION
	ARRAY_SIZE
	ASCII
	ASIN
	ASSERT
	ATAN
	ATAN2
	AVG
	BASE64_DECODE
	BASE64_ENCODE
	BIT_AND
	BIT_LENGTH
	BIT_NOT
	BIT_OR
	BIT_XOR
	BITAGG_AND
	BITAGG_OR
	BOOLAGG_AND
	BOOLAGG_OR
	CASE
	CEIL
	CHR
	COALESCE
	FIELD
	CONCAT_WS
	CONTAINS
	CORR
	COS
	COT
	COUNT
	COUNT_IF
	COVAR_POP
	COVAR_SAMPLE
	CONVERT_TZ
	CUME_DIST
	CURRENT_DATE
	CURRENT_TIMESTAMP
	DATE_FROM_PARTS
	DATE_PART
	DATEADD
	DATEDIFF
	TIMEDIFF
	TIMESTAMPDIFF
	DENSE_RANK
	EMPTY
	ENDSWITH
	EXP
	FINDINSET
	FIRST_VALUE
	FLOOR
	GREATEST
	GROUPING_ID
	HASH
	HASH_AGG
	HEX_DECODE
	HEX_ENCODE
	HEX
	IFF
	IFNULL
	ILIKE
	ILIKE_ALL
	ILIKE_ANY
	IN
	LAG
	LAST_VALUE
	LEAD
	LEAST
	LEFT
	LENGTH
	LENGTH_UTF8
	LIKE
	LIKE_ALL
	LIKE_ANY
	LN
	NOT_IN
	LOG
	LOG2
	LOG10
	LOWER
	LPAD
	LTRIM
	MAX
	MEDIAN
	MIN
	MODE
	MONTH
	NORMAL
	NTH_VALUE
	NTILE
	NULLIF
	PERCENT_RANK
	PI
	POSITION
	POW
	PREFIX_EQ
	PREFIX_IN
	PREFIX_BETWEEN
	RADIAN
	RANDOM
	RANK
	REGEXP
	REGEXP_INSTR
	REGEXP_LIKE
	REGEXP_REPLACE
	REGEXP_SUBSTR
	REG_MATCH
	NOT_REG_MATCH
	REPEAT
	REPLACE
	REVERSE
	RIGHT
	ROUND
	ROW_NUMBER
	RPAD
	RTRIM
	SIGN
	SIN
	SINH
	SPACE
	SPLIT
	SPLIT_PART
	SQRT
	STARCOUNT
	STARTSWITH
	STDDEV_POP
	STDDEV_SAMPLE
	SUBSTR
	SUM
	GROUP_CONCAT
	TAN
	TO_DATE
	STR_TO_DATE
	TO_INTERVAL
	TRANSLATE
	TRIM
	UNIFORM
	SHA2
	UTC_TIMESTAMP
	UNIX_TIMESTAMP
	FROM_UNIXTIME
	UPPER
	VAR_POP
	VAR_SAMPLE

	DATE
	TIME
	DAY
	DAYOFYEAR
	INTERVAL
	EXTRACT
	OCT
	SUBSTRING
	ENCODE
	DECODE
	SUBSTRING_INDEX
	WEEK
	WEEKDAY
	YEAR
	HOUR
	MINUTE
	SECOND
	TO_DAYS
	TO_SECONDS

	DATE_ADD
	DATE_SUB
	APPROX_COUNT_DISTINCT

	LOAD_FILE

	//information functions
	//Reference to : https://dev.mysql.com/doc/refman/8.0/en/information-functions.html
	DATABASE
	USER
	CONNECTION_ID
	CHARSET
	CONVERT
	CURRENT_ROLE
	FOUND_ROWS
	ICULIBVERSION
	LAST_INSERT_ID
	LAST_QUERY_ID
	LAST_UUID
	ROLES_GRAPHML
	ROW_COUNT
	VERSION
	COLLATION
	CURRENT_ACCOUNT_ID
	CURRENT_ACCOUNT_NAME
	CURRENT_ROLE_ID
	CURRENT_ROLE_NAME
	CURRENT_USER_ID
	CURRENT_USER_NAME

	TIMESTAMP
	DATE_FORMAT
	JSON_EXTRACT
	JSON_QUOTE
	JSON_UNQUOTE
	FORMAT
	SLEEP
	INSTR
	LOCATE

	UUID
	SERIAL
	SERIAL_FULL
	BIN

	ENABLE_FAULT_INJECTION
	DISABLE_FAULT_INJECTION
	ADD_FAULT_POINT     // Add a fault point
	REMOVE_FAULT_POINT  // Remove
	TRIGGER_FAULT_POINT // Trigger.

	MO_MEMORY_USAGE // Dump memory usage
	MO_ENABLE_MEMORY_USAGE_DETAIL
	MO_DISABLE_MEMORY_USAGE_DETAIL

	// MO_CTL is used to check some internal status, and issue some ctl commands to the service.
	// see builtin.ctl.ctl.go to get detail.
	MO_CTL

	MO_SHOW_VISIBLE_BIN      // parse type/onUpdate/default []byte to visible string
	MO_SHOW_VISIBLE_BIN_ENUM //  parse type/onUpdate/default []byte to visible string for enum

	MO_TABLE_ROWS    // table rows
	MO_TABLE_SIZE    // table size
	MO_TABLE_COL_MAX // table column max value
	MO_TABLE_COL_MIN // table column min value

	MO_LOG_DATE // parse date from string, like __mo_filepath
	MO_CHECH_LEVEL
	PURGE_LOG // purge mo internal log, like rawlog, statement_info, metric
	MO_CU
	MO_CU_V1

	GIT_VERSION
	BUILD_VERSION

	// be used: insert into t1 values(1,1) on duplicate key update a=values(a)+a+1
	VALUES
	BINARY
	INTERNAL_CHAR_LENGTH
	INTERNAL_CHAR_SIZE
	INTERNAL_NUMERIC_PRECISION
	INTERNAL_NUMERIC_SCALE
	INTERNAL_DATETIME_SCALE
	INTERNAL_COLUMN_CHARACTER_SET
	INTERNAL_AUTO_INCREMENT

	// be uesed: enum
	CAST_INDEX_TO_VALUE
	CAST_VALUE_TO_INDEX
	CAST_INDEX_VALUE_TO_INDEX

	//Sequence function
	NEXTVAL
	SETVAL
	CURRVAL
	LASTVAL

	// Array Function
	SUMMATION
	L1_NORM // L1_NORMALIZATION
	L2_NORM // L2 NORMALIZATION
	INNER_PRODUCT
	COSINE_SIMILARITY
	VECTOR_DIMS     //VECTOR DIMENSIONS
	NORMALIZE_L2    //NORMALIZE L2
	L2_DISTANCE     //L2_DISTANCE
	COSINE_DISTANCE //COSINE_DISTANCE
	CLUSTER_CENTERS // CLUSTER_CENTERS

	PYTHON_UDF

	// observation function
	MO_CPU
	MO_MEMORY
	MO_CPU_DUMP

	// FUNCTION_END_NUMBER is not a function, just a flag to record the max number of function.
	// TODO: every one should put the new function id in front of this one if you want to make a new function.
	FUNCTION_END_NUMBER
)

All function IDs

View Source
const ADZeroDays = 366

The number of days in the year 0000 AD

View Source
const ADZeroSeconds = 31622400

Seconds in 0000 AD

View Source
const (
	AllColumns = "*"
)
View Source
const (
	DefaultEscapeChar = '\\'
)
View Source
const (
	DefaultStackSize = 10 << 20 // 10MB
)
View Source
const (
	MaxAllowedValue = 8000
)
View Source
const MaxTgtLen = int64(16 * 1024 * 1024)
View Source
const SecondsIn24Hours = 86400

24-hour seconds

Variables

View Source
var (
	// WeekdayNames lists names of weekdays, which are used in builtin function `date_format`.
	WeekdayNames = []string{
		"Monday",
		"Tuesday",
		"Wednesday",
		"Thursday",
		"Friday",
		"Saturday",
		"Sunday",
	}

	// MonthNames lists names of months, which are used in builtin function `date_format`.
	MonthNames = []string{
		"January",
		"February",
		"March",
		"April",
		"May",
		"June",
		"July",
		"August",
		"September",
		"October",
		"November",
		"December",
	}

	// AbbrevWeekdayName lists Abbreviation of week names, which are used int builtin function 'date_format'
	AbbrevWeekdayName = []string{
		"Sun",
		"Mon",
		"Tue",
		"Wed",
		"Thu",
		"Fri",
		"Sat",
	}
)
View Source
var AggSumOverloadID = encodeOverloadID(SUM, 0)
View Source
var AndFunctionEncodedID = encodeOverloadID(AND, 0)
View Source
var AndFunctionName = "and"
View Source
var EqualFunctionEncodedID = encodeOverloadID(EQUAL, 0)
View Source
var EqualFunctionName = "="
View Source
var GroupConcatFunctionID = encodeOverloadID(GROUP_CONCAT, 0)
View Source
var InFunctionEncodedID = encodeOverloadID(IN, 0)
View Source
var InFunctionName = "in"
View Source
var MaxInt64digits = numOfDigits(math.MaxInt64) // 19
View Source
var MaxUint64digits = numOfDigits(math.MaxUint64) // 20
View Source
var ScaleTable = [...]uint64{
	1,
	10,
	100,
	1000,
	10000,
	100000,
	1000000,
	10000000,
	100000000,
	1000000000,
	10000000000,
	100000000000,
	1000000000000,
	10000000000000,
	100000000000000,
	1000000000000000,
	10000000000000000,
	100000000000000000,
	1000000000000000000,
	10000000000000000000,
}

ScaleTable is a lookup array for digits

View Source
var SerialFunctionEncodeID = encodeOverloadID(SERIAL, 0)

Functions

func AbbrDayOfMonth added in v0.8.0

func AbbrDayOfMonth(day int) string

AbbrDayOfMonth: Get the abbreviation of month of day

func AbsArray added in v1.1.0

func AbsArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func AbsDecimal128 added in v0.8.0

func AbsDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func AbsFloat64 added in v0.8.0

func AbsFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func AbsInt64 added in v0.8.0

func AbsInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func AbsUInt64 added in v0.8.0

func AbsUInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func AddFaultPoint added in v0.8.0

func AddFaultPoint(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func AsciiInt added in v0.8.0

func AsciiInt[T types.Ints](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func AsciiString added in v0.8.0

func AsciiString(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func AsciiUint added in v0.8.0

func AsciiUint[T types.UInts](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Bin added in v0.8.0

func BinFloat added in v0.8.0

func BinFloat[T constraints.Float](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Binary added in v0.8.0

func Binary(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func BitCast added in v1.0.0

func BitCast(
	parameters []*vector.Vector,
	result vector.FunctionResultWrapper,
	proc *process.Process,
	length int,
) error

func BitLengthFunc added in v0.8.0

func BitLengthFunc(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func BuildVersion added in v0.8.0

func BuildVersion(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func BuiltInSerialFull added in v1.1.0

func BuiltInSerialFull(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func CalcToSeconds added in v0.8.0

func CalcToSeconds(ctx context.Context, datetimes []types.Datetime, ns *nulls.Nulls) ([]int64, error)

CalcToSeconds: CalcToDays is used to return a day number (the number of days since year 0)

func CastIndexToValue added in v1.0.0

func CastIndexToValue(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

CastIndexToValue returns enum type index according to the value

func CastIndexValueToIndex added in v1.0.0

func CastIndexValueToIndex(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

CastIndexValueToIndex returns enum type index according to the index value

func CastValueToIndex added in v1.0.0

func CastValueToIndex(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

CastValueToIndex returns enum type index according to the value

func CeilDecimal128 added in v0.8.0

func CeilDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CeilDecimal64 added in v0.8.0

func CeilDecimal64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CeilFloat64 added in v0.8.0

func CeilFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CeilInt64 added in v0.8.0

func CeilInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CeilStr added in v0.8.0

func CeilStr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CeilUint64 added in v0.8.0

func CeilUint64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func Charset added in v0.8.0

func Charset(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func CoalesceGeneral added in v0.8.0

func CoalesceGeneral[T NormalType](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CoalesceStr added in v0.8.0

func CoalesceStr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func Collation added in v0.8.0

func Collation(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func ConcatWs added in v0.8.0

func ConcatWs(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func ConnectionID added in v0.8.0

func ConnectionID(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func ConvertTz added in v1.0.0

func ConvertTz(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func CosineDistanceArray added in v1.1.0

func CosineDistanceArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func CosineSimilarityArray added in v1.1.0

func CosineSimilarityArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func CurrentDate added in v0.8.0

func CurrentDate(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Currval added in v0.8.0

func Currval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DateAdd added in v0.8.0

func DateAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DateFSP added in v0.8.0

func DateFSP(date string) (fsp int)

DateFSP gets fsp from date string.

func DateFormat added in v0.8.0

func DateFormat(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DateStringAdd added in v0.8.0

func DateStringAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DateStringSub added in v0.8.0

func DateStringSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func DateStringToDate added in v0.8.0

func DateStringToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

DateStringToDate can still speed up if vec is const. but we will do the constant fold. so it does not matter.

func DateStringToMonth added in v0.8.0

func DateStringToMonth(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

TODO: I will support template soon.

func DateStringToTime added in v0.8.0

func DateStringToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateStringToTimestamp added in v0.8.0

func DateStringToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateStringToYear added in v0.8.0

func DateStringToYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateSub added in v0.8.0

func DateSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DateTimeDiff added in v0.8.0

func DateTimeDiff(intervalUnit string, t1 types.Datetime, t2 types.Datetime) int64

DateTimeDiff returns t2 - t1 where t1 and t2 are datetime expressions. The unit for the result is given by the unit argument. The values for interval unit are "QUARTER","YEAR","MONTH", "DAY", "HOUR", "SECOND", "MICROSECOND"

func DateToDate added in v0.8.0

func DateToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToDay added in v0.8.0

func DateToDay(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToMonth added in v0.8.0

func DateToMonth(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToTime added in v0.8.0

func DateToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToTimestamp added in v0.8.0

func DateToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToWeek added in v0.8.0

func DateToWeek(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToWeekday added in v0.8.0

func DateToWeekday(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DateToYear added in v0.8.0

func DateToYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeAdd added in v0.8.0

func DatetimeAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DatetimeSub added in v0.8.0

func DatetimeSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func DatetimeToDate added in v0.8.0

func DatetimeToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToDay added in v0.8.0

func DatetimeToDay(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToHour added in v0.8.0

func DatetimeToHour(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToMinute added in v0.8.0

func DatetimeToMinute(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToMonth added in v0.8.0

func DatetimeToMonth(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToSecond added in v0.8.0

func DatetimeToSecond(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToTime added in v0.8.0

func DatetimeToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToTimestamp added in v0.8.0

func DatetimeToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToWeek added in v0.8.0

func DatetimeToWeek(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToWeekday added in v0.8.0

func DatetimeToWeekday(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DatetimeToYear added in v0.8.0

func DatetimeToYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func DayOfYear added in v0.8.0

func DayOfYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Decimal128ToTime added in v0.8.0

func Decimal128ToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Decode added in v1.1.0

func Decode(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

Decode convert binary data from textual representation in string. Options for format are same as in encode. return type types.T_blob. eg:- decode("616263", "hex") -> abc https://www.postgresql.org/docs/9.0/functions-binarystring.html#FUNCTIONS-BINARYSTRING-OTHER NOTE: bytea in postgres is BLOB in mysql.https://stackoverflow.com/q/1942586/1609570

func DecodeOverloadID

func DecodeOverloadID(overloadID int64) (fid int32, oIndex int32)

func DeduceNotNullable added in v0.7.0

func DeduceNotNullable(overloadID int64, args []*plan.Expr) bool

DeduceNotNullable helps optimization sometimes. deduce notNullable for function for example, create table t1(c1 int not null, c2 int, c3 int not null ,c4 int); sql select c1+1, abs(c2), cast(c3 as varchar(10)) from t1 where c1=c3; we can deduce that c1+1, cast c3 and c1=c3 is notNullable, abs(c2) is nullable.

func DisableFaultInjection added in v0.8.0

func DisableFaultInjection(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Empty added in v0.8.0

func Empty(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func EnableFaultInjection added in v0.8.0

func EnableFaultInjection(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Encode added in v1.1.0

func Encode(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

Encode convert binary data into a textual representation. Supported formats are: base64 and hex. return type types.T_text eg:- encode("abc", "hex") -> 616263 https://www.postgresql.org/docs/9.0/functions-binarystring.html#FUNCTIONS-BINARYSTRING-OTHER

func EndsWith added in v0.8.0

func EndsWith(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func ExtractFromDate added in v0.8.0

func ExtractFromDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func ExtractFromDatetime added in v0.8.0

func ExtractFromDatetime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func ExtractFromTime added in v0.8.0

func ExtractFromTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func ExtractFromVarchar added in v0.8.0

func ExtractFromVarchar(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FieldNumber added in v0.8.0

func FieldNumber[T number](ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func FieldString added in v0.8.0

func FieldString(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func FillSpaceNumber added in v0.8.0

func FillSpaceNumber[T types.BuiltinNumber](v T) (string, error)

func FindInSet added in v0.8.0

func FindInSet(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FloorDecimal128 added in v0.8.0

func FloorDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FloorDecimal64 added in v0.8.0

func FloorDecimal64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FloorFloat64 added in v0.8.0

func FloorFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FloorInt64 added in v0.8.0

func FloorInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FloorStr added in v0.8.0

func FloorStr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FloorUInt64 added in v0.8.0

func FloorUInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FormatCastErrorForInsertValue added in v0.8.0

func FormatCastErrorForInsertValue(ctx context.Context, originStr string, typ types.Type, extraInfo string) error

func FormatInt2BufByWidth added in v1.1.1

func FormatInt2BufByWidth(num, n int, buf *bytes.Buffer)

func FormatIntByWidth added in v0.8.0

func FormatIntByWidth(num, n int) string

FormatIntByWidth: Formatintwidthn is used to format ints with width parameter n. Insufficient numbers are filled with 0.

func FormatWith2Args added in v0.8.0

func FormatWith2Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func FormatWith3Args added in v0.8.0

func FormatWith3Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func FoundRows added in v0.8.0

func FoundRows(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func FromUnixTimeFloat64 added in v0.8.0

func FromUnixTimeFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FromUnixTimeFloat64Format added in v0.8.0

func FromUnixTimeFloat64Format(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FromUnixTimeInt64 added in v0.8.0

func FromUnixTimeInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FromUnixTimeInt64Format added in v0.8.0

func FromUnixTimeInt64Format(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FromUnixTimeUint64 added in v0.8.0

func FromUnixTimeUint64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func FromUnixTimeUint64Format added in v0.8.0

func FromUnixTimeUint64Format(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func GetAggFunctionNameByID added in v1.0.0

func GetAggFunctionNameByID(overloadID int64) string

func GetFunctionById added in v0.8.0

func GetFunctionById(ctx context.Context, overloadID int64) (f overload, err error)

func GetFunctionByIdWithoutError added in v0.8.0

func GetFunctionByIdWithoutError(overloadID int64) (f overload, exists bool)

func GetFunctionIsAggregateByName

func GetFunctionIsAggregateByName(name string) bool

func GetFunctionIsWinFunByName added in v0.8.0

func GetFunctionIsWinFunByName(name string) bool

func GetFunctionIsWinOrderFunById added in v1.0.0

func GetFunctionIsWinOrderFunById(overloadID int64) bool

func GetFunctionIsWinOrderFunByName added in v0.8.0

func GetFunctionIsWinOrderFunByName(name string) bool

func GetFunctionIsZonemappableById added in v1.1.0

func GetFunctionIsZonemappableById(ctx context.Context, overloadID int64) (bool, error)

func GitVersion added in v0.8.0

func GitVersion(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func HexInt64 added in v0.8.0

func HexInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func HexString added in v0.8.0

func HexString(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func ICULIBVersion added in v0.8.0

func ICULIBVersion(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func IfTypeCastSupported added in v0.8.0

func IfTypeCastSupported(sourceType, targetType types.T) bool

func InnerProductArray added in v1.1.0

func InnerProductArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Instr added in v0.8.0

func Instr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func Int64ToTime added in v0.8.0

func Int64ToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func IntSingle added in v0.8.0

func IntSingle[T types.Ints](val T, start int) uint8

func JsonExtract added in v0.8.0

func JsonExtract(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func JsonQuote added in v0.8.0

func JsonQuote(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func JsonUnquote added in v0.8.0

func JsonUnquote(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func L1NormArray added in v1.1.0

func L1NormArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func L2DistanceArray added in v1.1.0

func L2DistanceArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func L2NormArray added in v1.1.0

func L2NormArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func LastInsertID added in v0.8.0

func LastInsertID(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func LastQueryID added in v0.8.0

func LastQueryID(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func LastQueryIDWithoutParam added in v0.8.0

func LastQueryIDWithoutParam(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

TODO: may support soon.

func Lastval added in v0.8.0

func Lastval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func Left added in v0.8.0

func Left(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func Length added in v0.8.0

func Length(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func LengthUTF8 added in v0.8.0

func LengthUTF8(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func LoadFile added in v0.8.0

func LoadFile(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

Too confused.

func Locate2Args added in v1.0.1

func Locate2Args(str string, subStr string) int64

evalate LOCATE(substr, str)

func Locate3Args added in v1.0.1

func Locate3Args(str string, subStr string, pos int64) int64

evalate LOCATE(substr, str, pos)

func Ltrim added in v0.8.0

func Ltrim(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoCPU added in v1.1.0

func MoCPU(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoCPUDump added in v1.1.0

func MoCPUDump(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoDisableMemUsageDetail added in v0.8.0

func MoDisableMemUsageDetail(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoEnableMemUsageDetail added in v0.8.0

func MoEnableMemUsageDetail(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoMemUsage added in v0.8.0

func MoMemUsage(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoMemory added in v1.1.0

func MoMemory(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func MoTableColMax added in v0.8.0

func MoTableColMax(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

MoTableColMax return the max value of the column

func MoTableColMin added in v0.8.0

func MoTableColMin(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

MoTableColMax return the max value of the column

func MoTableRows added in v0.8.0

func MoTableRows(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

MoTableRows returns an estimated row number of a table.

func MoTableSize added in v0.8.0

func MoTableSize(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

MoTableSize returns an estimated size of a table.

func NewCast added in v0.8.0

func NewCast(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Nextval added in v0.8.0

func Nextval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func NormalizeL2Array added in v1.1.0

func NormalizeL2Array[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Oct added in v0.8.0

func OctFloat added in v0.8.0

func OctFloat[T constraints.Float](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func OverflowForNumericToNumeric added in v0.8.0

func OverflowForNumericToNumeric[T1, T2 constraints.Integer | constraints.Float](ctx context.Context,
	xs []T1, nsp *nulls.Nulls) error

func Pi added in v0.8.0

func Pi(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Power added in v0.8.0

func Power(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func PrefixBetween added in v1.1.1

func PrefixBetween(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func PrefixEq added in v1.1.0

func PrefixEq(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func PrefixIn added in v1.1.0

func PrefixIn(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func ReadFromFile added in v0.8.0

func ReadFromFile(Filepath string, fs fileservice.FileService) (io.ReadCloser, error)

func RemoveFaultPoint added in v0.8.0

func RemoveFaultPoint(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func Replace added in v0.8.0

func Replace(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func Reverse added in v0.8.0

func Reverse(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func RolesGraphml added in v0.8.0

func RolesGraphml(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func RoundDecimal128 added in v0.8.0

func RoundDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func RoundDecimal64 added in v0.8.0

func RoundDecimal64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func RoundFloat64 added in v0.8.0

func RoundFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func RoundInt64 added in v0.8.0

func RoundInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func RoundUint64 added in v0.8.0

func RoundUint64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func RowCount added in v0.8.0

func RowCount(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Rtrim added in v0.8.0

func Rtrim(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func RunFunctionDirectly added in v0.8.0

func RunFunctionDirectly(proc *process.Process, overloadID int64, inputs []*vector.Vector, length int) (*vector.Vector, error)

RunFunctionDirectly runs a function directly without any protections. It is dangerous and should be used only when you are sure that the overloadID is correct and the inputs are valid.

func Setval added in v0.8.0

func Setval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func Sleep added in v0.8.0

func Sleep[T uint64 | float64](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func SpaceNumber added in v0.8.0

func SpaceNumber[T types.BuiltinNumber](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func SplitPart added in v0.8.0

func SplitPart(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func SplitSingle added in v0.8.0

func SplitSingle(str, sep string, cnt uint32) (string, bool)

func StartsWith added in v0.8.0

func StartsWith(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func StringSingle added in v0.8.0

func StringSingle(val []byte) uint8

func SubStrIndex added in v0.8.0

func SubStrIndex[T number](ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func SubStringWith2Args added in v0.8.0

func SubStringWith2Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func SubStringWith3Args added in v0.8.0

func SubStringWith3Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func SummationArray added in v1.1.0

func SummationArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TimeAdd added in v0.8.0

func TimeAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func TimeDiff added in v0.8.0

func TimeDiff[T types.Time | types.Datetime](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func TimeToDate added in v0.8.0

func TimeToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TimeToTime added in v0.8.0

func TimeToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TimestampAdd added in v0.8.0

func TimestampAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func TimestampDiff added in v0.8.0

func TimestampDiff(ivecs []*vector.Vector, result vector.FunctionResultWrapper, _ *process.Process, length int) (err error)

func TimestampSub added in v0.8.0

func TimestampSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func TimestampToHour added in v0.8.0

func TimestampToHour(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TimestampToMinute added in v0.8.0

func TimestampToMinute(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TimestampToSecond added in v0.8.0

func TimestampToSecond(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TimestampToTimestamp added in v0.8.0

func TimestampToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func TriggerFaultPoint added in v0.8.0

func TriggerFaultPoint(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func Trim added in v0.8.0

func Trim(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) (err error)

func UTCTimestamp added in v0.8.0

func UTCTimestamp(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func UdfArgTypeCast added in v1.1.0

func UdfArgTypeCast(from []types.Type, to []types.T) []types.Type

func UdfArgTypeMatch added in v1.1.0

func UdfArgTypeMatch(from []types.Type, to []types.T) (bool, int)

func UintSingle added in v0.8.0

func UintSingle[T types.UInts](val T, start int) uint8

func User added in v0.8.0

func User(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Values added in v0.8.0

func Values(parameters []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func VectorDimsArray added in v1.1.0

func VectorDimsArray[T types.RealNumbers](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

func Version added in v0.8.0

func Version(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error

Types

type Arg added in v1.1.0

type Arg struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

Arg of Udf

type DateFormatFunc added in v1.1.1

type DateFormatFunc func(ctx context.Context, datetime types.Datetime, format string, buf *bytes.Buffer) error

type DefaultPkgReader added in v1.1.0

type DefaultPkgReader struct {
	Proc *process.Process
}

func (*DefaultPkgReader) Get added in v1.1.0

func (d *DefaultPkgReader) Get(ctx context.Context, path string) (io.ReadCloser, error)

type FuncExplainLayout

type FuncExplainLayout int32
const (
	STANDARD_FUNCTION          FuncExplainLayout = iota // standard function
	UNARY_ARITHMETIC_OPERATOR                           // unary arithmetic operator
	BINARY_ARITHMETIC_OPERATOR                          // binary arithmetic operator
	UNARY_LOGICAL_OPERATOR                              // unary logical operator
	BINARY_LOGICAL_OPERATOR                             // binary logical operator
	COMPARISON_OPERATOR                                 // comparison operator
	CAST_EXPRESSION                                     // CAST expression
	CASE_WHEN_EXPRESSION                                // CASE ... WHEN ... expression
	BETWEEN_AND_EXPRESSION                              // BETWEEN ... AND ... expression
	IN_PREDICATE                                        // IN predicate
	IS_EXPRESSION                                       // IS expression
	IS_NOT_EXPRESSION                                   // IS NOT operator
	NOPARAMETER_FUNCTION                                // noparameter function
	DATE_INTERVAL_EXPRESSION                            // DATE expression, INTERVAL expression
	EXTRACT_FUNCTION                                    // EXTRACT function,such as EXTRACT(MONTH/DAY/HOUR/MINUTE/SECOND FROM p)
	POSITION_FUNCTION                                   // POSITION function, such as POSITION(substr IN str)
	EXISTS_ANY_PREDICATE
	UNKNOW_KIND_FUNCTION
)

func GetLayoutById added in v0.8.0

func GetLayoutById(ctx context.Context, overloadID int64) (FuncExplainLayout, error)

type FuncGetResult added in v0.8.0

type FuncGetResult struct {
	// contains filtered or unexported fields
}

func GetFunctionByName

func GetFunctionByName(ctx context.Context, name string, args []types.Type) (r FuncGetResult, err error)

func (*FuncGetResult) CannotRunInParallel added in v0.8.0

func (fr *FuncGetResult) CannotRunInParallel() bool

func (*FuncGetResult) GetEncodedOverloadID added in v0.8.0

func (fr *FuncGetResult) GetEncodedOverloadID() (overloadID int64)

func (*FuncGetResult) GetReturnType added in v0.8.0

func (fr *FuncGetResult) GetReturnType() types.Type

func (*FuncGetResult) ShouldDoImplicitTypeCast added in v0.8.0

func (fr *FuncGetResult) ShouldDoImplicitTypeCast() (typs []types.Type, should bool)

type FuncNew added in v0.8.0

type FuncNew struct {

	// All overloads of the function.
	Overloads []overload
	// contains filtered or unexported fields
}

FuncNew stores all information about a function. including the unique id that marks the function, the class which the function belongs to, and all overloads of the function.

type GeneralTime added in v0.8.0

type GeneralTime struct {
	// contains filtered or unexported fields
}

GeneralTime is the internal struct type for Time.

func FromDate added in v0.8.0

func FromDate(year int, month int, day int, hour int, minute int, second int, microsecond int) GeneralTime

func NewGeneralTime added in v0.8.0

func NewGeneralTime() *GeneralTime

func (GeneralTime) Minute added in v0.8.0

func (t GeneralTime) Minute() int

Minute returns the minute value.

func (*GeneralTime) ResetTime added in v0.8.0

func (t *GeneralTime) ResetTime()

Reset GeneralTime to initialization state

func (GeneralTime) String added in v0.8.0

func (t GeneralTime) String() string

String implements fmt.Stringer.

type Month added in v0.8.0

type Month int

The month represents one month of the year (January=1,...).

const (
	January Month = 1 + iota
	February
	March
	April
	May
	June
	July
	August
	September
	October
	November
	December
)

type NonSqlUdfBody added in v1.1.0

type NonSqlUdfBody struct {
	Handler string `json:"handler"`
	Import  bool   `json:"import"`
	Body    string `json:"body"`
}

type NormalType added in v0.8.0

type TGenericOfIn added in v0.8.0

type Udf added in v1.1.0

type Udf struct {
	// sql string, or json string of NonSqlUdfBody
	Body         string `json:"body"`
	Language     string `json:"language"`
	RetType      string `json:"rettype"`
	Args         []*Arg `json:"args"`
	Db           string `json:"db"`
	ModifiedTime string `json:"modified_time"`

	ArgsType []types.Type `json:"-"`
}

func (*Udf) GetArgsPlanType added in v1.1.0

func (u *Udf) GetArgsPlanType() []*plan.Type

func (*Udf) GetArgsType added in v1.1.0

func (u *Udf) GetArgsType() []types.Type

func (*Udf) GetPlanExpr added in v1.1.0

func (u *Udf) GetPlanExpr() *plan.Expr

func (*Udf) GetRetPlanType added in v1.1.0

func (u *Udf) GetRetPlanType() *plan.Type

func (*Udf) GetRetType added in v1.1.0

func (u *Udf) GetRetType() types.Type

type UdfWithContext added in v1.1.0

type UdfWithContext struct {
	*Udf    `json:"udf"`
	Context map[string]string `json:"context"` // context map
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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