planbuilder

package
v0.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Gen4 uses the default Gen4 planner, which is the greedy planner
	Gen4 = querypb.ExecuteOptions_Gen4
	// Gen4GreedyOnly uses only the faster greedy planner
	Gen4GreedyOnly = querypb.ExecuteOptions_Gen4Greedy
	// Gen4Left2Right joins table in the order they are listed in the FROM-clause
	Gen4Left2Right = querypb.ExecuteOptions_Gen4Left2Right
)
View Source
const (
	ViewDifferentKeyspace string = "Select query does not belong to the same keyspace as the view statement"
	ViewComplex           string = "Complex select queries are not supported in create or alter view statements"
	DifferentDestinations string = "Tables or Views specified in the query do not belong to the same destination"
)

Error messages for CreateView queries

Variables

This section is empty.

Functions

func BuildFromStmt

func BuildFromStmt(ctx context.Context, query string, stmt sqlparser.Statement, reservedVars *sqlparser.ReservedVars, vschema plancontext.VSchema, bindVarNeeds *sqlparser.BindVarNeeds, enableOnlineDDL, enableDirectDDL bool) (*engine.Plan, error)

BuildFromStmt builds a plan based on the AST provided.

func GetShardRoute added in v0.15.0

func GetShardRoute(vschema plancontext.VSchema, keyspace, shard string) (*vindexes.Keyspace, error)

func SupplyProjection added in v0.20.0

func SupplyProjection(eVindexFunc *engine.VindexFunc, expr *sqlparser.AliasedExpr, reuse bool) error

SupplyProjection pushes the given aliased expression into the fields and cols slices of the vindexFunc engine primitive. The method returns the offset of the new expression in the columns list.

func TestBuilder added in v0.9.0

func TestBuilder(query string, vschema plancontext.VSchema, keyspace string) (*engine.Plan, error)

TestBuilder builds a plan for a query based on the specified vschema. This method is only used from tests

func WireupRoute added in v0.20.0

WireupRoute returns an engine primitive for the given route.

Types

type UnsupportedSupplyWeightString added in v0.10.0

type UnsupportedSupplyWeightString struct {
	Type string
}

UnsupportedSupplyWeightString represents the error where the supplying a weight string is not supported

func (UnsupportedSupplyWeightString) Error added in v0.10.0

Error function implements the error interface

Directories

Path Synopsis
Package operators contains the operators used to plan queries.
Package operators contains the operators used to plan queries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL