join

package
v0.0.0-...-714aee7 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SpecInt       = SpecType{"int64", genericArray, genericAppend, intConv}
	SpecFloat     = SpecType{"float64", genericArray, genericAppend, fltConv}
	SpecBool      = SpecType{"bool", genericArray, genericAppend, boolConv}
	SpecBlob      = SpecType{"blob", blobArray, blobAppend, genericConv}
	SpecString    = SpecType{"string", genericArray, genericAppend, strConv}
	SpecTimestamp = SpecType{"time.Time", timeArray, timeAppend, genericConv}
)

Functions

func GetAll

func GetAll(node sql.Node) (mjs []*query.MultiJoin)

func GetTables

func GetTables(mj *query.MultiJoin) (aht []*query.AdHocTable)

func MakeExecutable

func MakeExecutable(node sql.Node) (sql.Node, error)

Types

type HashReducer

type HashReducer struct {
	Tables []int
	Hashes [][]sql.Expression
}

type RealJoin

type RealJoin struct {
	*query.Cookie
	Tables    []*query.AdHocTable
	Offsets   []int
	Dominated []sql.Expression /* Dominated specifiers. */
	Equals    []sql.Expression /* Straight equals. Suitable for Hash Join. */
	Filters   []sql.Expression /* Other filters. */

	Prefilter  []sql.Expression     /* Per-Table input filters. */
	Indexer    []matcher.FieldSpecs /* Index-Scan hints. */
	Indexer2   []*SpecBuilder       /* Preprocessed version of .Indexer */
	Postfilter []sql.Expression
	Chunk      int
}

func NewRealJoin

func NewRealJoin(mj *query.MultiJoin) (r *RealJoin)

func (*RealJoin) Children

func (r *RealJoin) Children() []sql.Node

func (*RealJoin) FindPatterns

func (r *RealJoin) FindPatterns()

func (*RealJoin) GetHashFor

func (r *RealJoin) GetHashFor(tss ...matcher.TableSet) (perTS [][]sql.Expression)

func (*RealJoin) GetHashForReducer

func (r *RealJoin) GetHashForReducer(hr *HashReducer)

func (*RealJoin) GetReducers

func (r *RealJoin) GetReducers() (lst []*HashReducer)

func (*RealJoin) IterateOver

func (r *RealJoin) IterateOver(ctx *sql.Context, endpt apis.BlockEndpoint, chunk int) error

func (*RealJoin) MergeHashes

func (r *RealJoin) MergeHashes() (sm hashjoin.MergeHashes)

func (*RealJoin) Resolved

func (r *RealJoin) Resolved() bool

func (*RealJoin) RowIter

func (r *RealJoin) RowIter(ctx *sql.Context) (sql.RowIter, error)

func (*RealJoin) Schema

func (r *RealJoin) Schema() (s sql.Schema)

func (*RealJoin) String

func (r *RealJoin) String() string

func (*RealJoin) TransformExpressionsUp

func (r *RealJoin) TransformExpressionsUp(sql.TransformExprFunc) (sql.Node, error)

func (*RealJoin) TransformUp

func (r *RealJoin) TransformUp(f sql.TransformNodeFunc) (sql.Node, error)

type SpecBuilder

type SpecBuilder struct {
	Names    []string
	Specs    []SpecType
	Base     []TargetedExpressions
	PerTable [][]TargetedExpressions
}

func NewSpecBuilder

func NewSpecBuilder(tables []*query.AdHocTable, specs matcher.FieldSpecs) (sb *SpecBuilder)

func (*SpecBuilder) BaseSpecs

func (s *SpecBuilder) BaseSpecs(ctx *sql.Context) (res []interface{}, e error)

func (*SpecBuilder) Lookup

func (s *SpecBuilder) Lookup(src api.RowSource, specs []interface{}) (api.RowIter, error)

func (*SpecBuilder) SpecsSetRows

func (s *SpecBuilder) SpecsSetRows(ctx *sql.Context, tab int, rows []sql.Row, specs []interface{}) error

type SpecType

type SpecType struct {
	Name   string
	New    func() interface{}
	Append func(array, elem interface{}) interface{}
	Conv   func(interface{}) interface{}
}

func (SpecType) String

func (s SpecType) String() string

type TargetedExpressions

type TargetedExpressions struct {
	Target int
	Exprs  []sql.Expression
}

Directories

Path Synopsis
Interfaces for Row-Passing.
Interfaces for Row-Passing.

Jump to

Keyboard shortcuts

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