Documentation ¶
Index ¶
- func CheckPlanNodeIdentical(node1, node2 *planpb.PlanNode) bool
- func CheckPredicatesIdentical(expr, other *planpb.Expr) bool
- func CheckQueryInfoIdentical(info1, info2 *planpb.QueryInfo) bool
- func CheckVectorANNSIdentical(node1, node2 *planpb.VectorANNS) bool
- func ConvertToGenericValue(templateName string, templateValue *schemapb.TemplateValue) (*planpb.GenericValue, error)
- func CreateRequeryPlan(pkField *schemapb.FieldSchema, ids *schemapb.IDs) *planpb.PlanNode
- func CreateRetrievePlan(schema *typeutil.SchemaHelper, exprStr string, ...) (*planpb.PlanNode, error)
- func CreateSearchPlan(schema *typeutil.SchemaHelper, exprStr string, vectorFieldName string, ...) (*planpb.PlanNode, error)
- func FillBinaryArithOpEvalRangeExpressionValue(expr *planpb.BinaryArithOpEvalRangeExpr, ...) error
- func FillBinaryRangeExpressionValue(expr *planpb.BinaryRangeExpr, templateValues map[string]*planpb.GenericValue) error
- func FillExpressionValue(expr *planpb.Expr, templateValues map[string]*planpb.GenericValue) error
- func FillJSONContainsExpressionValue(expr *planpb.JSONContainsExpr, templateValues map[string]*planpb.GenericValue) error
- func FillTermExpressionValue(expr *planpb.TermExpr, templateValues map[string]*planpb.GenericValue) error
- func FillUnaryRangeExpressionValue(expr *planpb.UnaryRangeExpr, templateValues map[string]*planpb.GenericValue) error
- func HandleCompare(op int, left, right *ExprWithType) (*planpb.Expr, error)
- func IsAlwaysTruePlan(plan *planpb.PlanNode) bool
- func IsArray(n *planpb.GenericValue) bool
- func IsBool(n *planpb.GenericValue) bool
- func IsFloating(n *planpb.GenericValue) bool
- func IsInteger(n *planpb.GenericValue) bool
- func IsNumber(n *planpb.GenericValue) bool
- func IsString(n *planpb.GenericValue) bool
- func NewBool(value bool) *planpb.GenericValue
- func NewFloat(value float64) *planpb.GenericValue
- func NewInt(value int64) *planpb.GenericValue
- func NewString(value string) *planpb.GenericValue
- func ParseExpr(schema *typeutil.SchemaHelper, exprStr string, ...) (*planpb.Expr, error)
- func ParseIdentifier(schema *typeutil.SchemaHelper, identifier string, ...) error
- func ShowExpr(expr *planpb.Expr)
- func UnmarshalExpressionValues(input map[string]*schemapb.TemplateValue) (map[string]*planpb.GenericValue, error)
- type ExprWithType
- func Add(a, b *planpb.GenericValue) *ExprWithType
- func And(a, b *planpb.GenericValue) (*ExprWithType, error)
- func BitAnd(a, b *planpb.GenericValue) (*ExprWithType, error)
- func BitNot(a *planpb.GenericValue) (*ExprWithType, error)
- func BitOr(a, b *planpb.GenericValue) (*ExprWithType, error)
- func BitXor(a, b *planpb.GenericValue) (*ExprWithType, error)
- func Divide(a, b *planpb.GenericValue) (*ExprWithType, error)
- func Equal(a, b *planpb.GenericValue) *ExprWithType
- func Greater(a, b *planpb.GenericValue) *ExprWithType
- func GreaterEqual(a, b *planpb.GenericValue) *ExprWithType
- func Less(a, b *planpb.GenericValue) *ExprWithType
- func LessEqual(a, b *planpb.GenericValue) *ExprWithType
- func Modulo(a, b *planpb.GenericValue) (*ExprWithType, error)
- func Multiply(a, b *planpb.GenericValue) *ExprWithType
- func Negative(a *planpb.GenericValue) *ExprWithType
- func Not(a *planpb.GenericValue) *ExprWithType
- func NotEqual(a, b *planpb.GenericValue) *ExprWithType
- func Or(a, b *planpb.GenericValue) (*ExprWithType, error)
- func Power(a, b *planpb.GenericValue) *ExprWithType
- func ShiftLeft(a, b *planpb.GenericValue) (*ExprWithType, error)
- func ShiftRight(a, b *planpb.GenericValue) (*ExprWithType, error)
- func Subtract(a, b *planpb.GenericValue) *ExprWithType
- type LogicalExprVisitor
- type ParserVisitor
- func (v *ParserVisitor) VisitAddSub(ctx *parser.AddSubContext) interface{}
- func (v *ParserVisitor) VisitArray(ctx *parser.ArrayContext) interface{}
- func (v *ParserVisitor) VisitArrayLength(ctx *parser.ArrayLengthContext) interface{}
- func (v *ParserVisitor) VisitBitAnd(ctx *parser.BitAndContext) interface{}
- func (v *ParserVisitor) VisitBitOr(ctx *parser.BitOrContext) interface{}
- func (v *ParserVisitor) VisitBitXor(ctx *parser.BitXorContext) interface{}
- func (v *ParserVisitor) VisitBoolean(ctx *parser.BooleanContext) interface{}
- func (v *ParserVisitor) VisitCall(ctx *parser.CallContext) interface{}
- func (v *ParserVisitor) VisitEmptyArray(ctx *parser.EmptyArrayContext) interface{}
- func (v *ParserVisitor) VisitEquality(ctx *parser.EqualityContext) interface{}
- func (v *ParserVisitor) VisitExists(ctx *parser.ExistsContext) interface{}
- func (v *ParserVisitor) VisitFloating(ctx *parser.FloatingContext) interface{}
- func (v *ParserVisitor) VisitIdentifier(ctx *parser.IdentifierContext) interface{}
- func (v *ParserVisitor) VisitInteger(ctx *parser.IntegerContext) interface{}
- func (v *ParserVisitor) VisitJSONContains(ctx *parser.JSONContainsContext) interface{}
- func (v *ParserVisitor) VisitJSONContainsAll(ctx *parser.JSONContainsAllContext) interface{}
- func (v *ParserVisitor) VisitJSONContainsAny(ctx *parser.JSONContainsAnyContext) interface{}
- func (v *ParserVisitor) VisitJSONIdentifier(ctx *parser.JSONIdentifierContext) interface{}
- func (v *ParserVisitor) VisitLike(ctx *parser.LikeContext) interface{}
- func (v *ParserVisitor) VisitLogicalAnd(ctx *parser.LogicalAndContext) interface{}
- func (v *ParserVisitor) VisitLogicalOr(ctx *parser.LogicalOrContext) interface{}
- func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{}
- func (v *ParserVisitor) VisitParens(ctx *parser.ParensContext) interface{}
- func (v *ParserVisitor) VisitPower(ctx *parser.PowerContext) interface{}
- func (v *ParserVisitor) VisitRange(ctx *parser.RangeContext) interface{}
- func (v *ParserVisitor) VisitRelational(ctx *parser.RelationalContext) interface{}
- func (v *ParserVisitor) VisitReverseRange(ctx *parser.ReverseRangeContext) interface{}
- func (v *ParserVisitor) VisitShift(ctx *parser.ShiftContext) interface{}
- func (v *ParserVisitor) VisitString(ctx *parser.StringContext) interface{}
- func (v *ParserVisitor) VisitTemplateVariable(ctx *parser.TemplateVariableContext) interface{}
- func (v *ParserVisitor) VisitTerm(ctx *parser.TermContext) interface{}
- func (v *ParserVisitor) VisitTextMatch(ctx *parser.TextMatchContext) interface{}
- func (v *ParserVisitor) VisitUnary(ctx *parser.UnaryContext) interface{}
- type ShowExprVisitor
- func (v *ShowExprVisitor) VisitBinaryArithExpr(expr *planpb.BinaryArithExpr) interface{}
- func (v *ShowExprVisitor) VisitBinaryArithOpEvalRangeExpr(expr *planpb.BinaryArithOpEvalRangeExpr) interface{}
- func (v *ShowExprVisitor) VisitBinaryExpr(expr *planpb.BinaryExpr) interface{}
- func (v *ShowExprVisitor) VisitBinaryRangeExpr(expr *planpb.BinaryRangeExpr) interface{}
- func (v *ShowExprVisitor) VisitCallExpr(expr *planpb.CallExpr) interface{}
- func (v *ShowExprVisitor) VisitColumnExpr(expr *planpb.ColumnExpr) interface{}
- func (v *ShowExprVisitor) VisitCompareExpr(expr *planpb.CompareExpr) interface{}
- func (v *ShowExprVisitor) VisitExpr(expr *planpb.Expr) interface{}
- func (v *ShowExprVisitor) VisitTermExpr(expr *planpb.TermExpr) interface{}
- func (v *ShowExprVisitor) VisitUnaryExpr(expr *planpb.UnaryExpr) interface{}
- func (v *ShowExprVisitor) VisitUnaryRangeExpr(expr *planpb.UnaryRangeExpr) interface{}
- func (v *ShowExprVisitor) VisitValueExpr(expr *planpb.ValueExpr) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPlanNodeIdentical ¶
func CheckPredicatesIdentical ¶
CheckPredicatesIdentical check if two exprs are identical.
func CheckQueryInfoIdentical ¶
func CheckVectorANNSIdentical ¶
func CheckVectorANNSIdentical(node1, node2 *planpb.VectorANNS) bool
func ConvertToGenericValue ¶
func ConvertToGenericValue(templateName string, templateValue *schemapb.TemplateValue) (*planpb.GenericValue, error)
func CreateRequeryPlan ¶
func CreateRetrievePlan ¶
func CreateRetrievePlan(schema *typeutil.SchemaHelper, exprStr string, exprTemplateValues map[string]*schemapb.TemplateValue) (*planpb.PlanNode, error)
func CreateSearchPlan ¶
func FillBinaryArithOpEvalRangeExpressionValue ¶
func FillBinaryArithOpEvalRangeExpressionValue(expr *planpb.BinaryArithOpEvalRangeExpr, templateValues map[string]*planpb.GenericValue) error
func FillBinaryRangeExpressionValue ¶
func FillBinaryRangeExpressionValue(expr *planpb.BinaryRangeExpr, templateValues map[string]*planpb.GenericValue) error
func FillExpressionValue ¶
func FillJSONContainsExpressionValue ¶
func FillJSONContainsExpressionValue(expr *planpb.JSONContainsExpr, templateValues map[string]*planpb.GenericValue) error
func FillTermExpressionValue ¶
func FillUnaryRangeExpressionValue ¶
func FillUnaryRangeExpressionValue(expr *planpb.UnaryRangeExpr, templateValues map[string]*planpb.GenericValue) error
func HandleCompare ¶
func HandleCompare(op int, left, right *ExprWithType) (*planpb.Expr, error)
func IsAlwaysTruePlan ¶
func IsArray ¶
func IsArray(n *planpb.GenericValue) bool
func IsBool ¶
func IsBool(n *planpb.GenericValue) bool
func IsFloating ¶
func IsFloating(n *planpb.GenericValue) bool
func IsInteger ¶
func IsInteger(n *planpb.GenericValue) bool
func IsNumber ¶
func IsNumber(n *planpb.GenericValue) bool
func IsString ¶
func IsString(n *planpb.GenericValue) bool
func NewBool ¶
func NewBool(value bool) *planpb.GenericValue
func NewFloat ¶
func NewFloat(value float64) *planpb.GenericValue
func NewInt ¶
func NewInt(value int64) *planpb.GenericValue
func NewString ¶
func NewString(value string) *planpb.GenericValue
func ParseExpr ¶
func ParseExpr(schema *typeutil.SchemaHelper, exprStr string, exprTemplateValues map[string]*schemapb.TemplateValue) (*planpb.Expr, error)
func ParseIdentifier ¶
func UnmarshalExpressionValues ¶
func UnmarshalExpressionValues(input map[string]*schemapb.TemplateValue) (map[string]*planpb.GenericValue, error)
Types ¶
type ExprWithType ¶
type ExprWithType struct {
// contains filtered or unexported fields
}
func Add ¶
func Add(a, b *planpb.GenericValue) *ExprWithType
func And ¶
func And(a, b *planpb.GenericValue) (*ExprWithType, error)
func BitAnd ¶
func BitAnd(a, b *planpb.GenericValue) (*ExprWithType, error)
func BitNot ¶
func BitNot(a *planpb.GenericValue) (*ExprWithType, error)
func BitOr ¶
func BitOr(a, b *planpb.GenericValue) (*ExprWithType, error)
func BitXor ¶
func BitXor(a, b *planpb.GenericValue) (*ExprWithType, error)
func Divide ¶
func Divide(a, b *planpb.GenericValue) (*ExprWithType, error)
func Equal ¶
func Equal(a, b *planpb.GenericValue) *ExprWithType
func Greater ¶
func Greater(a, b *planpb.GenericValue) *ExprWithType
func GreaterEqual ¶
func GreaterEqual(a, b *planpb.GenericValue) *ExprWithType
func Less ¶
func Less(a, b *planpb.GenericValue) *ExprWithType
func LessEqual ¶
func LessEqual(a, b *planpb.GenericValue) *ExprWithType
func Modulo ¶
func Modulo(a, b *planpb.GenericValue) (*ExprWithType, error)
func Multiply ¶
func Multiply(a, b *planpb.GenericValue) *ExprWithType
func Negative ¶
func Negative(a *planpb.GenericValue) *ExprWithType
func Not ¶
func Not(a *planpb.GenericValue) *ExprWithType
func NotEqual ¶
func NotEqual(a, b *planpb.GenericValue) *ExprWithType
func Or ¶
func Or(a, b *planpb.GenericValue) (*ExprWithType, error)
func Power ¶
func Power(a, b *planpb.GenericValue) *ExprWithType
func ShiftLeft ¶
func ShiftLeft(a, b *planpb.GenericValue) (*ExprWithType, error)
func ShiftRight ¶
func ShiftRight(a, b *planpb.GenericValue) (*ExprWithType, error)
func Subtract ¶
func Subtract(a, b *planpb.GenericValue) *ExprWithType
type LogicalExprVisitor ¶
type LogicalExprVisitor interface { VisitExpr(expr *planpb.Expr) interface{} VisitTermExpr(expr *planpb.TermExpr) interface{} VisitUnaryExpr(expr *planpb.UnaryExpr) interface{} VisitBinaryExpr(expr *planpb.BinaryExpr) interface{} VisitCompareExpr(expr *planpb.CompareExpr) interface{} VisitUnaryRangeExpr(expr *planpb.UnaryRangeExpr) interface{} VisitBinaryRangeExpr(expr *planpb.BinaryRangeExpr) interface{} VisitBinaryArithOpEvalRangeExpr(expr *planpb.BinaryArithOpEvalRangeExpr) interface{} VisitBinaryArithExpr(expr *planpb.BinaryArithExpr) interface{} VisitValueExpr(expr *planpb.ValueExpr) interface{} VisitColumnExpr(expr *planpb.ColumnExpr) interface{} }
func NewShowExprVisitor ¶
func NewShowExprVisitor() LogicalExprVisitor
type ParserVisitor ¶
type ParserVisitor struct { parser.BasePlanVisitor // contains filtered or unexported fields }
func NewParserVisitor ¶
func NewParserVisitor(schema *typeutil.SchemaHelper) *ParserVisitor
func (*ParserVisitor) VisitAddSub ¶
func (v *ParserVisitor) VisitAddSub(ctx *parser.AddSubContext) interface{}
VisitAddSub translates expr to arithmetic plan.
func (*ParserVisitor) VisitArray ¶
func (v *ParserVisitor) VisitArray(ctx *parser.ArrayContext) interface{}
func (*ParserVisitor) VisitArrayLength ¶
func (v *ParserVisitor) VisitArrayLength(ctx *parser.ArrayLengthContext) interface{}
func (*ParserVisitor) VisitBitAnd ¶
func (v *ParserVisitor) VisitBitAnd(ctx *parser.BitAndContext) interface{}
VisitBitAnd not supported.
func (*ParserVisitor) VisitBitOr ¶
func (v *ParserVisitor) VisitBitOr(ctx *parser.BitOrContext) interface{}
VisitBitOr unsupported.
func (*ParserVisitor) VisitBitXor ¶
func (v *ParserVisitor) VisitBitXor(ctx *parser.BitXorContext) interface{}
VisitBitXor not supported.
func (*ParserVisitor) VisitBoolean ¶
func (v *ParserVisitor) VisitBoolean(ctx *parser.BooleanContext) interface{}
VisitBoolean translates expr to GenericValue.
func (*ParserVisitor) VisitCall ¶
func (v *ParserVisitor) VisitCall(ctx *parser.CallContext) interface{}
VisitCall parses the expr to call plan.
func (*ParserVisitor) VisitEmptyArray ¶
func (v *ParserVisitor) VisitEmptyArray(ctx *parser.EmptyArrayContext) interface{}
func (*ParserVisitor) VisitEquality ¶
func (v *ParserVisitor) VisitEquality(ctx *parser.EqualityContext) interface{}
VisitEquality translates expr to compare/range plan.
func (*ParserVisitor) VisitExists ¶
func (v *ParserVisitor) VisitExists(ctx *parser.ExistsContext) interface{}
func (*ParserVisitor) VisitFloating ¶
func (v *ParserVisitor) VisitFloating(ctx *parser.FloatingContext) interface{}
VisitFloating translates expr to GenericValue.
func (*ParserVisitor) VisitIdentifier ¶
func (v *ParserVisitor) VisitIdentifier(ctx *parser.IdentifierContext) interface{}
VisitIdentifier translates expr to column plan.
func (*ParserVisitor) VisitInteger ¶
func (v *ParserVisitor) VisitInteger(ctx *parser.IntegerContext) interface{}
VisitInteger translates expr to GenericValue.
func (*ParserVisitor) VisitJSONContains ¶
func (v *ParserVisitor) VisitJSONContains(ctx *parser.JSONContainsContext) interface{}
func (*ParserVisitor) VisitJSONContainsAll ¶
func (v *ParserVisitor) VisitJSONContainsAll(ctx *parser.JSONContainsAllContext) interface{}
func (*ParserVisitor) VisitJSONContainsAny ¶
func (v *ParserVisitor) VisitJSONContainsAny(ctx *parser.JSONContainsAnyContext) interface{}
func (*ParserVisitor) VisitJSONIdentifier ¶
func (v *ParserVisitor) VisitJSONIdentifier(ctx *parser.JSONIdentifierContext) interface{}
func (*ParserVisitor) VisitLike ¶
func (v *ParserVisitor) VisitLike(ctx *parser.LikeContext) interface{}
VisitLike handles match operations.
func (*ParserVisitor) VisitLogicalAnd ¶
func (v *ParserVisitor) VisitLogicalAnd(ctx *parser.LogicalAndContext) interface{}
VisitLogicalAnd apply logical and to two boolean expressions.
func (*ParserVisitor) VisitLogicalOr ¶
func (v *ParserVisitor) VisitLogicalOr(ctx *parser.LogicalOrContext) interface{}
VisitLogicalOr apply logical or to two boolean expressions.
func (*ParserVisitor) VisitMulDivMod ¶
func (v *ParserVisitor) VisitMulDivMod(ctx *parser.MulDivModContext) interface{}
VisitMulDivMod translates expr to arithmetic plan.
func (*ParserVisitor) VisitParens ¶
func (v *ParserVisitor) VisitParens(ctx *parser.ParensContext) interface{}
VisitParens unpack the parentheses.
func (*ParserVisitor) VisitPower ¶
func (v *ParserVisitor) VisitPower(ctx *parser.PowerContext) interface{}
VisitPower parses power expression.
func (*ParserVisitor) VisitRange ¶
func (v *ParserVisitor) VisitRange(ctx *parser.RangeContext) interface{}
VisitRange translates expr to range plan.
func (*ParserVisitor) VisitRelational ¶
func (v *ParserVisitor) VisitRelational(ctx *parser.RelationalContext) interface{}
VisitRelational translates expr to range/compare plan.
func (*ParserVisitor) VisitReverseRange ¶
func (v *ParserVisitor) VisitReverseRange(ctx *parser.ReverseRangeContext) interface{}
VisitReverseRange parses the expression like "1 > a > 0".
func (*ParserVisitor) VisitShift ¶
func (v *ParserVisitor) VisitShift(ctx *parser.ShiftContext) interface{}
VisitShift unsupported.
func (*ParserVisitor) VisitString ¶
func (v *ParserVisitor) VisitString(ctx *parser.StringContext) interface{}
VisitString translates expr to GenericValue.
func (*ParserVisitor) VisitTemplateVariable ¶
func (v *ParserVisitor) VisitTemplateVariable(ctx *parser.TemplateVariableContext) interface{}
func (*ParserVisitor) VisitTerm ¶
func (v *ParserVisitor) VisitTerm(ctx *parser.TermContext) interface{}
VisitTerm translates expr to term plan.
func (*ParserVisitor) VisitTextMatch ¶
func (v *ParserVisitor) VisitTextMatch(ctx *parser.TextMatchContext) interface{}
func (*ParserVisitor) VisitUnary ¶
func (v *ParserVisitor) VisitUnary(ctx *parser.UnaryContext) interface{}
VisitUnary unpack the +expr to expr.
type ShowExprVisitor ¶
type ShowExprVisitor struct{}
func (*ShowExprVisitor) VisitBinaryArithExpr ¶
func (v *ShowExprVisitor) VisitBinaryArithExpr(expr *planpb.BinaryArithExpr) interface{}
func (*ShowExprVisitor) VisitBinaryArithOpEvalRangeExpr ¶
func (v *ShowExprVisitor) VisitBinaryArithOpEvalRangeExpr(expr *planpb.BinaryArithOpEvalRangeExpr) interface{}
func (*ShowExprVisitor) VisitBinaryExpr ¶
func (v *ShowExprVisitor) VisitBinaryExpr(expr *planpb.BinaryExpr) interface{}
func (*ShowExprVisitor) VisitBinaryRangeExpr ¶
func (v *ShowExprVisitor) VisitBinaryRangeExpr(expr *planpb.BinaryRangeExpr) interface{}
func (*ShowExprVisitor) VisitCallExpr ¶
func (v *ShowExprVisitor) VisitCallExpr(expr *planpb.CallExpr) interface{}
func (*ShowExprVisitor) VisitColumnExpr ¶
func (v *ShowExprVisitor) VisitColumnExpr(expr *planpb.ColumnExpr) interface{}
func (*ShowExprVisitor) VisitCompareExpr ¶
func (v *ShowExprVisitor) VisitCompareExpr(expr *planpb.CompareExpr) interface{}
func (*ShowExprVisitor) VisitExpr ¶
func (v *ShowExprVisitor) VisitExpr(expr *planpb.Expr) interface{}
func (*ShowExprVisitor) VisitTermExpr ¶
func (v *ShowExprVisitor) VisitTermExpr(expr *planpb.TermExpr) interface{}
func (*ShowExprVisitor) VisitUnaryExpr ¶
func (v *ShowExprVisitor) VisitUnaryExpr(expr *planpb.UnaryExpr) interface{}
func (*ShowExprVisitor) VisitUnaryRangeExpr ¶
func (v *ShowExprVisitor) VisitUnaryRangeExpr(expr *planpb.UnaryRangeExpr) interface{}
func (*ShowExprVisitor) VisitValueExpr ¶
func (v *ShowExprVisitor) VisitValueExpr(expr *planpb.ValueExpr) interface{}