package
0.0.0-20241018072137-00ebc30e3b87
Repository: https://github.com/secretflow/scql.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

BuildCastFunction builds a CAST ScalarFunction from the Expression.
BuildCastFunction4Union build a implicitly CAST ScalarFunction from the Union Expression.
CheckArgsNotMultiColumnRow checks the args are not multi-column row.
Column2Exprs will transfer column slice to expression slice.
ColumnSubstitute substitutes the columns in filter to expressions in select fields.
ColumnSubstituteImpl tries to substitute column expr using newExprs, the newFunctionInternal is only called if its child is substituted.
CompareDecimal compares two decimals.
CompareInt compares two integers.
CompareReal compares two float-point values.
CompareString compares two strings.
ComposeCNFCondition composes CNF items into a balance deep CNF tree, which benefits a lot for pb decoder/encoder.
ComposeDNFCondition composes DNF items into a balance deep DNF tree.
ConstructPositionExpr constructs PositionExpr with the given ParamMarkerExpr.
EvaluateExprWithNull sets columns in schema as null and calculate the final result of the scalar function.
ExprFromSchema checks if all columns of this expression are from the same schema.
No description provided by the author
ExtractColumnsFromExpressions is a more efficient version of ExtractColumns for batch operation.
ExtractCorColumns extracts correlated column from given expression.
ExtractFiltersFromDNFs checks whether the cond is DNF.
FindFieldName finds the column name from NameSlice.
FindFieldNameIdxByColName finds the index of corresponding name in the given slice.
FlattenDNFConditions extracts DNF expression's leaf item.
GetAccurateCmpType uses a more complex logic to decide the EvalType of the two args when compare with each other than getBaseCmpType does.
GetCmpFunction get the compare function according to two arguments.
GetFuncArg gets the argument of the function at idx.
GetRowLen gets the length if the func is row, returns 1 if not row.
GetUint64FromConstant gets a uint64 from constant expression.
InferType4ControlFuncs infer result type for builtin IF, IFNULL, NULLIF, LEAD and LAG.
IsBinaryLiteral checks whether an expression is a binary literal.
No description provided by the author
IsEQCondFromIn checks if an expression is equal condition converted from `[not] in (subq)`.
IsMutableEffectsExpr checks if expr contains function which is mutable or has side effects.
MergeSchema will merge two schema into one schema.
NewFunction creates a new scalar function or constant via a constant folding.
NewFunctionBase creates a new scalar function with no constant folding.
NewFunctionInternal is similar to NewFunction, but do not returns error, should only be used internally.
NewSchema returns a schema made by its parameter.
NewWithSeed create a rng with random seed.
NewWithTime create a rng with time stamp.
PopRowFirstArg pops the first element and returns the rest of row.
RefineComparedConstant changes a non-integer constant argument to its ceiling or floor result by the given op.
RemoveDupExprs removes identical exprs.
ScalarFuncs2Exprs converts []*ScalarFunction to []Expression.
SetBinFlagOrBinStr sets resTp to binary string if argTp is a binary string, if not, sets the binary flag of resTp to true if argTp has binary flag.
SplitCNFItems splits CNF items.
No description provided by the author
WrapWithCastAsDecimal wraps `expr` with `cast` if the return type of expr is not type decimal, otherwise, returns `expr` directly.
WrapWithCastAsDuration wraps `expr` with `cast` if the return type of expr is not type duration, otherwise, returns `expr` directly.
WrapWithCastAsInt wraps `expr` with `cast` if the return type of expr is not type int, otherwise, returns `expr` directly.
WrapWithCastAsJSON wraps `expr` with `cast` if the return type of expr is not type json, otherwise, returns `expr` directly.
WrapWithCastAsReal wraps `expr` with `cast` if the return type of expr is not type real, otherwise, returns `expr` directly.
WrapWithCastAsString wraps `expr` with `cast` if the return type of expr is not type string, otherwise, returns `expr` directly.
WrapWithCastAsTime wraps `expr` with `cast` if the return type of expr is not same as type of the specified `tp` , otherwise, returns `expr` directly.

# Variables

DeferredFunctions stores non-deterministic functions, which can be deferred only when the plan cache is enabled.
DisableFoldFunctions stores functions which prevent child scope functions from being constant folded.
No description provided by the author
All the exported errors are defined here:.
No description provided by the author
error definitions.
No description provided by the author
No description provided by the author
Null stands for null constant.
One stands for a number 1.
Zero stands for a number 0.

# Structs

No description provided by the author
Constant stands for a constant value.
CorrelatedColumn stands for a column in a correlated sub query.
ExprConverter converts expression to expr node.
MysqlRng is random number generator and this implementation is ported from MySQL.
ParamMarker indicates param provided by COM_STMT_EXECUTE.
ScalarFunction is the function that returns a value.
Schema stands for the row schema and unique key information get from input.
VarAssignment represents a variable assignment in Set, such as set global a = 1.

# Interfaces

No description provided by the author
WildcardPattern is the interface used for wildcard pattern match.

# Type aliases

No description provided by the author
CompareFunc defines the compare function prototype.
KeyInfo stores the columns of one unique key or primary key.