cockroach: github.com/cockroachdb/cockroach/pkg/sql/opt/exec/execbuilder Index | Files

package execbuilder

import "github.com/cockroachdb/cockroach/pkg/sql/opt/exec/execbuilder"

Index

Package Files

builder.go format.go mutation.go relational.go scalar.go statement.go

func ReplaceVars Uses

func ReplaceVars(
    f *norm.Factory,
    applyInput memo.RelExpr,
    requiredPhysical *physical.Required,
    vars map[opt.ColumnID]tree.Datum,
)

ReplaceVars replaces the VariableExprs within a RelExpr with constant Datums provided by the vars map, which maps opt column id for each VariableExpr to replace to the Datum that should replace it. The memo within the input norm.Factory will be replaced with the result. requiredPhysical is the set of physical properties that are required of the root of the new expression.

type Builder Uses

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

Builder constructs a tree of execution nodes (exec.Node) from an optimized expression tree (opt.Expr).

func New Uses

func New(
    factory exec.Factory, mem *memo.Memo, catalog cat.Catalog, e opt.Expr, evalCtx *tree.EvalContext,
) *Builder

New constructs an instance of the execution node builder using the given factory to construct nodes. The Build method will build the execution node tree from the given optimized expression tree.

catalog is only needed if the statement contains an EXPLAIN (OPT, CATALOG).

func (*Builder) Build Uses

func (b *Builder) Build() (_ exec.Plan, err error)

Build constructs the execution node tree and returns its root node if no error occurred.

func (*Builder) BuildScalar Uses

func (b *Builder) BuildScalar(ivh *tree.IndexedVarHelper) (tree.TypedExpr, error)

BuildScalar converts a scalar expression to a TypedExpr. Variables are mapped according to the IndexedVarHelper.

func (*Builder) DisableTelemetry Uses

func (b *Builder) DisableTelemetry()

DisableTelemetry prevents the execbuilder from updating telemetry counters.

Package execbuilder imports 26 packages (graph) and is imported by 4 packages. Updated 2019-11-18. Refresh now. Tools for package owners.