Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Operator ¶
type Operator interface { // Clone will return a copy of this operator, protected so changed to the original will not impact the clone Clone(inputs []Operator) Operator // Inputs returns the inputs for this operator Inputs() []Operator // SetInputs changes the inputs for this op SetInputs([]Operator) // AddPredicate is used to push predicates. It pushed it as far down as is possible in the tree. // If we encounter a join and the predicate depends on both sides of the join, the predicate will be split into two parts, // where data is fetched from the LHS of the join to be used in the evaluation on the RHS // TODO: we should remove this and replace it with rewriters AddPredicate(ctx *plancontext.PlanningContext, expr sqlparser.Expr) (Operator, error) AddColumn(ctx *plancontext.PlanningContext, reuseExisting bool, addToGroupBy bool, expr *sqlparser.AliasedExpr) (int, error) FindCol(ctx *plancontext.PlanningContext, expr sqlparser.Expr, underRoute bool) (int, error) GetColumns(ctx *plancontext.PlanningContext) ([]*sqlparser.AliasedExpr, error) GetSelectExprs(ctx *plancontext.PlanningContext) (sqlparser.SelectExprs, error) ShortDescription() string GetOrdering() ([]OrderBy, error) }
Operator forms the tree of operators, representing the declarative query provided. The operator tree is no actually runnable, it's an intermediate representation used while query planning The mental model are operators that pull data from each other, the root being the full query output, and the leaves are most often `Route`s, representing communication with one or more shards. We want to push down as much work as possible under these Routes
type OrderBy ¶ added in v0.17.0
type OrderBy struct { Inner *sqlparser.Order // See GroupBy#SimplifiedExpr for more details about this SimplifiedExpr sqlparser.Expr }
OrderBy contains the expression to used in order by and also if ordering is needed at VTGate level then what the weight_string function expression to be sent down for evaluation.
Click to show internal directories.
Click to hide internal directories.