rowexec

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 35 Imported by: 3

Documentation

Index

Constants

View Source
const SavePointName = "__go_mysql_server_starting_savepoint__"

Variables

View Source
var DefaultBuilder = &BaseBuilder{}
View Source
var ErrMergeJoinExpectsComparerFilters = errors.New("merge join expects expression.Comparer filters, found: %T")
View Source
var ErrTableNotLockable = errors.NewKind("table %s is not lockable")

ErrTableNotLockable is returned whenever a lockable table can't be found.

Functions

func AddExpressionCloser added in v0.16.0

func AddExpressionCloser(node sql.Node, iter sql.RowIter) sql.RowIter

AddExpressionCloser returns a new iterator that ensures that any expressions that implement sql.Closer are closed. If there are no expressions that implement sql.Closer in the tree, then the original iterator is returned.

func GetColumnsAndPrepareExpressions

func GetColumnsAndPrepareExpressions(
	exprs []sql.Expression,
) ([]string, []sql.Expression, error)

GetColumnsAndPrepareExpressions extracts the unique columns required by all those expressions and fixes the indexes of the GetFields in the expressions to match a row with only the returned columns in that same order.

func NewLeftMergeJoin

func NewLeftMergeJoin(left, right sql.Node, cond sql.Expression) *plan.JoinNode

func NewMergeJoin

func NewMergeJoin(left, right sql.Node, cond sql.Expression) *plan.JoinNode

NewMergeJoin returns a node that performs a presorted merge join on two relations. We require 1) the join filter is an equality with disjoint join attributes, 2) the free attributes for a relation are a prefix for an index that will be used to return sorted rows.

func ProjectRow

func ProjectRow(
	ctx *sql.Context,
	projections []sql.Expression,
	row sql.Row,
) (sql.Row, error)

ProjectRow evaluates a set of projections.

Types

type BaseBuilder

type BaseBuilder struct{}

BaseBuilder converts a plan tree into a RowIter tree. All relational nodes have a build statement. Custom source nodes that provide rows that implement sql.ExecSourceRel are also built into the tree.

func (*BaseBuilder) Build

func (b *BaseBuilder) Build(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIter, error)

type EvalPartitionKeyValueIter

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

func NewEvalPartitionKeyValueIter

func NewEvalPartitionKeyValueIter(iter sql.PartitionIndexKeyValueIter, columns []string, exprs []sql.Expression) *EvalPartitionKeyValueIter

func (*EvalPartitionKeyValueIter) Close

func (i *EvalPartitionKeyValueIter) Close(ctx *sql.Context) error

func (*EvalPartitionKeyValueIter) Next

type ExecBuilderFunc

type ExecBuilderFunc func(ctx *sql.Context, n sql.Node, r sql.Row) (sql.RowIter, error)

type NameAndSchema

type NameAndSchema interface {
	sql.Nameable
	Schema() sql.Schema
}

Jump to

Keyboard shortcuts

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