optimizer

package
v0.0.0-...-b640dd5 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CantTableIdentifedErr = errors.New("tableName can't be identified!")
View Source
var InvalidColNameErr = errors.New("invalid column name!")
View Source
var InvalidTableNameErr = errors.New("invalid table name!")

Functions

func CheckIncludesORInPredicate

func CheckIncludesORInPredicate(exp interface{}) bool

func RewriteQueryInfo

func RewriteQueryInfo(c *catalog.Catalog, qi *parser.QueryInfo) (*parser.QueryInfo, error)

add table name prefix to column name if column name doesn't have it and attach predicate of ON clause to one of WHERE clause ATTENTION: this func modifies *qi* arg

Types

type CostAndPlan

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

type Direction

type Direction bool
const (
	DIR_RIGHT Direction = false
	DIR_LEFT  Direction = true
)

type Optimizer

type Optimizer interface {
	Optimize(*parser.QueryInfo, *executors.ExecutorContext, *catalog.Catalog, *access.Transaction) (plans.Plan, error)
}

type Range

type Range struct {
	Min          *types.Value
	Max          *types.Value
	MinInclusive bool
	MaxInclusive bool
}

func NewRange

func NewRange(valType types.TypeID) *Range

func (*Range) Empty

func (r *Range) Empty() bool

func (*Range) Update

func (r *Range) Update(op expression.ComparisonType, rhs *types.Value, dir Direction)

type SelingerOptimizer

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

func NewSelingerOptimizer

func NewSelingerOptimizer(qi *parser.QueryInfo, c *catalog.Catalog) *SelingerOptimizer

func (*SelingerOptimizer) Optimize

func (so *SelingerOptimizer) Optimize() (plans.Plan, error)

TODO: (SDB) [OPT] adding support of ON clause (Optimize, findBestJoin, findBestJoinInner, findBestScans, findBestScan)

Jump to

Keyboard shortcuts

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