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 cascades.go format.go mutation.go relational.go scalar.go statement.go

Constants

const ParallelScanResultThreshold = 10000

ParallelScanResultThreshold is the number of results up to which, if the maximum number of results returned by a scan is known, the scan disables batch limits in the dist sender. This results in the parallelization of these scans.

type Builder Uses

type Builder struct {

    // IsDDL is set to true if the statement contains DDL.
    IsDDL bool

    // containsFullTableScan is set to true if the statement contains a primary
    // index scan.
    ContainsFullTableScan bool

    // containsFullIndexScan is set to true if the statement contains a secondary
    // index scan.
    ContainsFullIndexScan bool
    // 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,
    allowAutoCommit bool,
) *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).

If allowAutoCommit is true, mutation operators can pass the auto commit flag to the factory (when the optimizer determines it is correct to do so). It should be false if the statement is executed as part of an explicit transaction.

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.

Package execbuilder imports 31 packages (graph) and is imported by 4 packages. Updated 2020-10-01. Refresh now. Tools for package owners.