Documentation ¶
Index ¶
- Constants
- Variables
- func AbbrDayOfMonth(day int) string
- func AbsDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func AbsFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func AbsInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func AbsUInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func AddFaultPoint(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func AsciiInt[T types.Ints](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func AsciiString(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func AsciiUint[T types.UInts](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Bin[T constraints.Unsigned | constraints.Signed](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func BinFloat[T constraints.Float](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Binary(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func BitCast(parameters []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func BitLengthFunc(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func BuildVersion(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func CalcToSeconds(ctx context.Context, datetimes []types.Datetime, ns *nulls.Nulls) ([]int64, error)
- func CastIndexToValue(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func CastIndexValueToIndex(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func CastValueToIndex(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func CeilDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func CeilDecimal64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func CeilFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func CeilInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func CeilStr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func CeilUint64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Charset(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func CoalesceGeneral[T NormalType](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func CoalesceStr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Collation(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func ConcatWs(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func ConnectionID(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func CurrentDate(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func Currval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DateAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DateFSP(date string) (fsp int)
- func DateFormat(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DateStringAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DateStringSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DateStringToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateStringToMonth(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateStringToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateStringToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateStringToYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DateTimeDiff(intervalUnit string, t1 types.Datetime, t2 types.Datetime) int64
- func DateToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToDay(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToMonth(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToWeek(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToWeekday(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DateToYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DatetimeSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func DatetimeToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToDay(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToHour(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToMinute(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToMonth(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToSecond(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToWeek(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToWeekday(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DatetimeToYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DayOfYear(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Decimal128ToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func DecodeOverloadID(overloadID int64) (fid int32, oIndex int32)
- func DeduceNotNullable(overloadID int64, args []*plan.Expr) bool
- func DisableFaultInjection(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func Empty(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func EnableFaultInjection(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func EndsWith(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func ExtractFromDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func ExtractFromDatetime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func ExtractFromTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func ExtractFromVarchar(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FieldNumber[T number](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FieldString(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FillSpaceNumber[T types.BuiltinNumber](v T) (string, error)
- func FindInSet(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FloorDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FloorDecimal64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FloorFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FloorInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FloorStr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FloorUInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FormatCastErrorForInsertValue(ctx context.Context, originStr string, typ types.Type, extraInfo string) error
- func FormatIntByWidth(num, n int) string
- func FormatWith2Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FormatWith3Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FoundRows(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func FromUnixTimeFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FromUnixTimeFloat64Format(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FromUnixTimeInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FromUnixTimeInt64Format(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FromUnixTimeUint64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func FromUnixTimeUint64Format(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func GetAggFunctionNameByID(overloadID int64) string
- func GetFunctionById(ctx context.Context, overloadID int64) (f overload, err error)
- func GetFunctionByIdWithoutError(overloadID int64) (f overload, exists bool)
- func GetFunctionIsAggregateByName(name string) bool
- func GetFunctionIsMonotonicById(ctx context.Context, overloadID int64) (bool, error)
- func GetFunctionIsWinFunByName(name string) bool
- func GetFunctionIsWinOrderFunById(overloadID int64) bool
- func GetFunctionIsWinOrderFunByName(name string) bool
- func GitVersion(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func HexInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func HexString(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func ICULIBVersion(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func IfTypeCastSupported(sourceType, targetType types.T) bool
- func Instr(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Int64ToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func IntSingle[T types.Ints](val T, start int) uint8
- func JsonExtract(parameters []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func JsonQuote(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func JsonUnquote(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func LastInsertID(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func LastQueryID(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func LastQueryIDWithoutParam(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) (err error)
- func Lastval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Left(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Length(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func LengthUTF8(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func LoadFile(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Ltrim(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoDisableMemUsageDetail(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoEnableMemUsageDetail(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoMemUsage(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoTableColMax(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoTableColMin(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoTableRows(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func MoTableSize(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func NewCast(parameters []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Nextval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Oct[T constraints.Unsigned | constraints.Signed](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func OctFloat[T constraints.Float](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func OverflowForNumericToNumeric[T1, T2 constraints.Integer | constraints.Float](ctx context.Context, xs []T1, nsp *nulls.Nulls) error
- func Pi(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func Power(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func ReadFromFile(Filepath string, fs fileservice.FileService) (io.ReadCloser, error)
- func RemoveFaultPoint(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Replace(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Reverse(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func RolesGraphml(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func RoundDecimal128(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func RoundDecimal64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func RoundFloat64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func RoundInt64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func RoundUint64(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func RowCount(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Rtrim(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func RunFunctionDirectly(proc *process.Process, overloadID int64, inputs []*vector.Vector, length int) (*vector.Vector, error)
- func Setval(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Sleep[T uint64 | float64](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func SpaceNumber[T types.BuiltinNumber](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func SplitPart(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func SplitSingle(str, sep string, cnt uint32) (string, bool)
- func StartsWith(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func StringSingle(val []byte) uint8
- func SubStrIndex[T number](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func SubStringWith2Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func SubStringWith3Args(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func TimeAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func TimeDiff[T types.Time | types.Datetime](ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func TimeToDate(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func TimeToTime(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func TimestampAdd(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func TimestampDiff(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func TimestampSub(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func TimestampToHour(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func TimestampToMinute(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func TimestampToSecond(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func TimestampToTimestamp(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func TriggerFaultPoint(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func Trim(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) (err error)
- func UTCTimestamp(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- func UintSingle[T types.UInts](val T, start int) uint8
- func User(ivecs []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Values(parameters []*vector.Vector, result vector.FunctionResultWrapper, ...) error
- func Version(_ []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, ...) error
- type FuncExplainLayout
- type FuncGetResult
- type FuncNew
- type FunctionSpecialRule
- type GeneralTime
- type Month
- type NormalType
- type TGenericOfIn
Constants ¶
const ( Distinct = 0x8000000000000000 DistinctMask = 0x7FFFFFFFFFFFFFFF )
const ( EQUAL = iota // = NOT_EQUAL // <> GREAT_THAN // > GREAT_EQUAL // >= LESS_THAN // < LESS_EQUAL // <= BETWEEN // BETWEEN UNARY_PLUS // UNARY_PLUS + UNARY_MINUS // UNARY_MINUS - UNARY_TILDE // UNARY_TILDE ~ PLUS // + MINUS // - MULTI // * DIV // / INTEGER_DIV // Div MOD // % CONCAT // || AND // AND OR // OR XOR // XOR NOT // NOT CAST // CAST BIT_CAST // BIT_CAST IS // IS ISNOT // ISNOT ISNULL // ISNULL ISNOTNULL // ISNOTNULL ISUNKNOWN // ISUNKNOWN ISNOTUNKNOWN // ISNOTUNKNOWN ISTRUE // ISTRUE ISNOTTRUE // ISNOTTRUE ISFALSE // ISFALSE ISNOTFALSE // ISNOTTRUE ISEMPTY // ISEMPTY NOT_IN_ROWS // NOT_IN_ROWS OP_BIT_AND // & OP_BIT_OR // | OP_BIT_XOR // ^ OP_BIT_SHIFT_LEFT // << OP_BIT_SHIFT_RIGHT // >> ABS // ABS ACOS // ACOS ADDDATE // ADDDATE ADDTIME // ADDTIME AES_DECRYPT // AES_DECRYPT AES_ENCRYPT // AES_ENCRYPT ANY_VALUE // ANY_VALUE APPROX_COUNT // APPROX_COUNT ARRAY_AGG // ARRAY_AGG ARRAY_APPEND // ARRAY_APPEND ARRAY_CAT // ARRAY_CAT ARRAY_CONTAINS // ARRAY_CONTAINS ARRAY_POSITION // ARRAY_POSITION ARRAY_SIZE // ARRAY_SIZE ASCII // ASCII ASIN // ASIN ASSERT // ASSERT ATAN // ATAN ATAN2 // ATAN2 AVG // AVG BASE64_DECODE // BASE64_DECODE BASE64_ENCODE // BASE64_ENCODE BIT_AND // BIT_AND BIT_LENGTH // BIT_LENGTH BIT_NOT // BIT_NOT BIT_OR // BIT_OR BIT_XOR // BIT_XOR BITAGG_AND // BITAGG_AND BITAGG_OR // BITAGG_OR BOOLAGG_AND // BOOLAGG_AND BOOLAGG_OR // BOOLAGG_OR CASE // CASE CEIL // CEIL CHR // CHR COALESCE // COALESCE FIELD // FIELD CONCAT_WS CONTAINS // CONTAINS CORR // CORR COS // COS COT // COT COUNT // COUNT COUNT_IF // COUNT_IF COVAR_POP // COVAR_POP COVAR_SAMPLE // COVAR_SAMPLE CUME_DIST // CUME_DIST CURRENT_DATE // CURRENT_DATE CURRENT_TIMESTAMP // CURRENT_TIMESTAMP DATE_FROM_PARTS // DATE_FROM_PARTS DATE_PART // DATE_PART DATEADD // DATEADD DATEDIFF // DATEDIFF TIMEDIFF // TIMEDIFF TIMESTAMPDIFF // TIMESTAMPDIFF DENSE_RANK // DENSE_RANK EMPTY ENDSWITH // ENDSWITH EXP // EXP FINDINSET FIRST_VALUE // FIRST_VALUE FLOOR // FLOOR GREATEST // GREATEST GROUPING_ID // GROUPING_ID HASH // HASH HASH_AGG // HASH_AGG HEX_DECODE // HEX_DECODE HEX_ENCODE // HEX_ENCODE HEX // HEX IFF // IFF IFNULL // IFNULL ILIKE // ILIKE ILIKE_ALL // ILIKE_ALL ILIKE_ANY // ILIKE_ANY IN // IN LAG // LAG LAST_VALUE // LAST_VALUE LEAD // LEAD LEAST // LEAST LEFT // LEFT LENGTH // LENGTH LENGTH_UTF8 LIKE // LIKE LIKE_ALL // LIKE_ALL LIKE_ANY // LIKE_ANY LN // LN NOT_IN // NOT_IN LOG // LOG LOWER // LOWER LPAD // LPAD LTRIM // LTRIM MAX // MAX MEDIAN // MEDIAN MIN // MIN MODE // MODE MONTH NORMAL // NORMAL NTH_VALUE // NTH_VALUE NTILE // NTILE NULLIF // NULLIF PERCENT_RANK // PERCENT_RANK PI // PI POSITION // POSITION POW // POW RADIAN // RADIAN RANDOM // RANDOM RANK // RANK REGEXP // REGEXP REGEXP_INSTR // REGEXP_INSTR REGEXP_LIKE // REGEXP_LIKE REGEXP_REPLACE // REGEXP_REPLACE REGEXP_SUBSTR // REGEXP_SUBSTR REG_MATCH // REG_MATHCH NOT_REG_MATCH // NOT_REG_MATCH REPEAT // REPEAT REPLACE // REPLACE REVERSE RIGHT // RIGHT ROUND // ROUND ROW_NUMBER // ROW_NUMBER RPAD // RPAD RTRIM // RTRIM SIGN // SIGN SIN // SIN SINH //SINH SPACE SPLIT // SPLIT SPLIT_PART // SPLIT_PART SQRT // SQRT STARCOUNT // STARTCOUNT STARTSWITH // STARTSWITH STDDEV_POP // STDDEV_POP STDDEV_SAMPLE // STDDEV_SAMPLE SUBSTR // SUBSTR SUM // SUM GROUP_CONCAT TAN // TAN TO_DATE STR_TO_DATE TO_INTERVAL // TO_INTERVAL TRANSLATE // TRANSLATE TRIM // TRIM UNIFORM // UNIFORM UTC_TIMESTAMP UNIX_TIMESTAMP FROM_UNIXTIME UPPER // UPPER VAR_POP // VAR_POP VAR_SAMPLE // VAR_SAMPLE EXISTS // EXISTS ALL // ALL ANY // ANY DATE // DATE TIME //TIME DAY //DAY DAYOFYEAR // DAYOFYEAR INTERVAL // INTERVAL EXTRACT // EXTRACT OCT SUBSTRING // SUBSTRING SUBSTRING_INDEX //SUBSTRING_INDEX WEEK //WEEK WEEKDAY YEAR // YEAR HOUR // HOUR MINUTE // MINUTE SECOND // SECOND TO_DAYS TO_SECONDS DATE_ADD // DATE_ADD DATE_SUB // DATE_SUB APPROX_COUNT_DISTINCT // APPROX_COUNT_DISTINCT, special aggregate LOAD_FILE // 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 // TIMESTAMP DATE_FORMAT // DATE_FORMAT JSON_EXTRACT // JSON_EXTRACT JSON_QUOTE // JSON_QUOTE JSON_UNQUOTE // JSON_UNQUOTE FORMAT // FORMAT SLEEP // sleep for a while INSTR UUID SERIAL BIN //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_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 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 // 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
const ADZeroDays = 366
The number of days in the year 0000 AD
const ADZeroSeconds = 31622400
Seconds in 0000 AD
const (
AllColumns = "*"
)
const (
DefaultEscapeChar = '\\'
)
const (
MaxAllowedValue = 8000
)
const MaxTgtLen = int64(16 * 1024 * 1024)
const SecondsIn24Hours = 86400
24-hour seconds
Variables ¶
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", } )
var AggSumOverloadID = encodeOverloadID(SUM, 0)
var AndFunctionEncodedID = encodeOverloadID(AND, 0)
var AndFunctionName = "and"
var EqualFunctionEncodedID = encodeOverloadID(EQUAL, 0)
var EqualFunctionName = "="
var GroupConcatFunctionID = encodeOverloadID(GROUP_CONCAT, 0)
var InFunctionEncodedID = encodeOverloadID(IN, 0)
var InFunctionName = "in"
var MaxInt64digits = numOfDigits(math.MaxInt64) // 19
var MaxUint64digits = numOfDigits(math.MaxUint64) // 20
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
var SerialFunctionEncodeID = encodeOverloadID(SERIAL, 0)
Functions ¶
func AbbrDayOfMonth ¶ added in v0.8.0
AbbrDayOfMonth: Get the abbreviation of month of day
func AbsDecimal128 ¶ added in v0.8.0
func AbsFloat64 ¶ added in v0.8.0
func AddFaultPoint ¶ added in v0.8.0
func AsciiString ¶ added in v0.8.0
func Bin ¶ added in v0.8.0
func Bin[T constraints.Unsigned | constraints.Signed](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error
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 BitLengthFunc ¶ added in v0.8.0
func BuildVersion ¶ added in v0.8.0
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 CeilDecimal64 ¶ added in v0.8.0
func CeilFloat64 ¶ added in v0.8.0
func CeilUint64 ¶ added in v0.8.0
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 ConnectionID ¶ added in v0.8.0
func CurrentDate ¶ added in v0.8.0
func DateFormat ¶ added in v0.8.0
func DateStringAdd ¶ added in v0.8.0
func DateStringSub ¶ added in v0.8.0
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 DateStringToTimestamp ¶ added in v0.8.0
func DateStringToYear ¶ added in v0.8.0
func DateTimeDiff ¶ added in v0.8.0
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 DateToMonth ¶ added in v0.8.0
func DateToTime ¶ added in v0.8.0
func DateToTimestamp ¶ added in v0.8.0
func DateToWeek ¶ added in v0.8.0
func DateToWeekday ¶ added in v0.8.0
func DateToYear ¶ added in v0.8.0
func DatetimeAdd ¶ added in v0.8.0
func DatetimeSub ¶ added in v0.8.0
func DatetimeToDate ¶ added in v0.8.0
func DatetimeToDay ¶ added in v0.8.0
func DatetimeToHour ¶ added in v0.8.0
func DatetimeToMinute ¶ added in v0.8.0
func DatetimeToMonth ¶ added in v0.8.0
func DatetimeToSecond ¶ added in v0.8.0
func DatetimeToTime ¶ added in v0.8.0
func DatetimeToTimestamp ¶ added in v0.8.0
func DatetimeToWeek ¶ added in v0.8.0
func DatetimeToWeekday ¶ added in v0.8.0
func DatetimeToYear ¶ added in v0.8.0
func Decimal128ToTime ¶ added in v0.8.0
func DecodeOverloadID ¶
func DeduceNotNullable ¶ added in v0.7.0
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 EnableFaultInjection ¶ added in v0.8.0
func ExtractFromDate ¶ added in v0.8.0
func ExtractFromDatetime ¶ added in v0.8.0
func ExtractFromTime ¶ added in v0.8.0
func ExtractFromVarchar ¶ added in v0.8.0
func FieldNumber ¶ added in v0.8.0
func FieldString ¶ added in v0.8.0
func FillSpaceNumber ¶ added in v0.8.0
func FillSpaceNumber[T types.BuiltinNumber](v T) (string, error)
func FloorDecimal128 ¶ added in v0.8.0
func FloorDecimal64 ¶ added in v0.8.0
func FloorFloat64 ¶ added in v0.8.0
func FloorInt64 ¶ added in v0.8.0
func FloorUInt64 ¶ added in v0.8.0
func FormatCastErrorForInsertValue ¶ added in v0.8.0
func FormatIntByWidth ¶ added in v0.8.0
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 FormatWith3Args ¶ added in v0.8.0
func FromUnixTimeFloat64 ¶ added in v0.8.0
func FromUnixTimeFloat64Format ¶ added in v0.8.0
func FromUnixTimeInt64 ¶ added in v0.8.0
func FromUnixTimeInt64Format ¶ added in v0.8.0
func FromUnixTimeUint64 ¶ added in v0.8.0
func FromUnixTimeUint64Format ¶ added in v0.8.0
func GetAggFunctionNameByID ¶ added in v1.0.0
func GetFunctionById ¶ added in v0.8.0
func GetFunctionByIdWithoutError ¶ added in v0.8.0
func GetFunctionIsMonotonicById ¶ added in v0.6.0
func GetFunctionIsWinFunByName ¶ added in v0.8.0
func GetFunctionIsWinOrderFunById ¶ added in v1.0.0
func GetFunctionIsWinOrderFunByName ¶ added in v0.8.0
func GitVersion ¶ added in v0.8.0
func ICULIBVersion ¶ added in v0.8.0
func IfTypeCastSupported ¶ added in v0.8.0
func Int64ToTime ¶ added in v0.8.0
func JsonExtract ¶ added in v0.8.0
func JsonUnquote ¶ added in v0.8.0
func LastInsertID ¶ added in v0.8.0
func LastQueryID ¶ added in v0.8.0
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 LengthUTF8 ¶ added in v0.8.0
func LoadFile ¶ added in v0.8.0
func LoadFile(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error
Too confused.
func MoDisableMemUsageDetail ¶ added in v0.8.0
func MoEnableMemUsageDetail ¶ added in v0.8.0
func MoMemUsage ¶ added in v0.8.0
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) 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) error
MoTableSize returns an estimated size of a table.
func Oct ¶ added in v0.8.0
func Oct[T constraints.Unsigned | constraints.Signed](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error
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 ReadFromFile ¶ added in v0.8.0
func ReadFromFile(Filepath string, fs fileservice.FileService) (io.ReadCloser, error)
func RemoveFaultPoint ¶ added in v0.8.0
func RolesGraphml ¶ added in v0.8.0
func RoundDecimal128 ¶ added in v0.8.0
func RoundDecimal64 ¶ added in v0.8.0
func RoundFloat64 ¶ added in v0.8.0
func RoundInt64 ¶ added in v0.8.0
func RoundUint64 ¶ added in v0.8.0
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 SpaceNumber ¶ added in v0.8.0
func SpaceNumber[T types.BuiltinNumber](ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc *process.Process, length int) error
func StartsWith ¶ added in v0.8.0
func StringSingle ¶ added in v0.8.0
func SubStrIndex ¶ added in v0.8.0
func SubStringWith2Args ¶ added in v0.8.0
func SubStringWith3Args ¶ added in v0.8.0
func TimeToDate ¶ added in v0.8.0
func TimeToTime ¶ added in v0.8.0
func TimestampAdd ¶ added in v0.8.0
func TimestampDiff ¶ added in v0.8.0
func TimestampSub ¶ added in v0.8.0
func TimestampToHour ¶ added in v0.8.0
func TimestampToMinute ¶ added in v0.8.0
func TimestampToSecond ¶ added in v0.8.0
func TimestampToTimestamp ¶ added in v0.8.0
func TriggerFaultPoint ¶ added in v0.8.0
func UTCTimestamp ¶ added in v0.8.0
Types ¶
type FuncExplainLayout ¶
type FuncExplainLayout int32
const ( STANDARD_FUNCTION FuncExplainLayout = 0 //standard function UNARY_ARITHMETIC_OPERATOR FuncExplainLayout = 1 //unary arithmetic operator BINARY_ARITHMETIC_OPERATOR FuncExplainLayout = 2 //binary arithmetic operator UNARY_LOGICAL_OPERATOR FuncExplainLayout = 3 // unary logical operator BINARY_LOGICAL_OPERATOR FuncExplainLayout = 4 // binary logical operator COMPARISON_OPERATOR FuncExplainLayout = 5 // comparison operator CAST_EXPRESSION FuncExplainLayout = 6 // cast expression CASE_WHEN_EXPRESSION FuncExplainLayout = 7 // case when expression BETWEEN_AND_EXPRESSION FuncExplainLayout = 8 IN_PREDICATE FuncExplainLayout = 9 //query 'in' predicate EXISTS_ANY_PREDICATE FuncExplainLayout = 10 //query predicate,such as exist,all,any IS_EXPRESSION FuncExplainLayout = 11 // IS expression NOPARAMETER_FUNCTION FuncExplainLayout = 12 // noparameter function DATE_INTERVAL_EXPRESSION FuncExplainLayout = 13 // date expression,interval expression EXTRACT_FUNCTION FuncExplainLayout = 14 // extract function,such as extract(MONTH/DAY/HOUR/MINUTE/SECOND FROM p) POSITION_FUNCTION FuncExplainLayout = 15 // position function, such as POSITION(substr IN str) UNKNOW_KIND_FUNCTION FuncExplainLayout = 16 IS_NOT_EXPRESSION FuncExplainLayout = 17 // IS NOT operator )
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 (*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 FunctionSpecialRule ¶ added in v0.8.0
func NewSpecialRule ¶ added in v0.8.0
func NewSpecialRule(name string, expressions []*plan.Expr) (FunctionSpecialRule, error)
type GeneralTime ¶ added in v0.8.0
type GeneralTime struct {
// contains filtered or unexported fields
}
GeneralTime is the internal struct type for Time.
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,...).
type NormalType ¶ added in v0.8.0
Source Files ¶
- arithmetic.go
- auto_increase.go
- baseTemplate.go
- func_binary.go
- func_builtin.go
- func_builtin_regexp.go
- func_cast.go
- func_compare.go
- func_mo.go
- func_str_to_date.go
- func_unary.go
- function.go
- function_id.go
- function_layout.go
- generalTime.go
- init.go
- list_agg.go
- list_builtIn.go
- list_operator.go
- list_window.go
- logicalOperator.go
- operatorSet.go
- operator_in.go
- seqfunc.go
- specialRule.go
- type_check.go