plan

package
v0.0.0-...-df06595 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StopPushdownRuleID    = 0x01
	PruneColumnRuleID     = 0x02
	ExtractPushDownRuleID = 0x04
)
View Source
const (
	Scan_Scope = iota
	Limit_Scope
	Order_Scope
	Group_Scope
	Import_Scope
	Filter_Scope
	Extract_Scope
	Projection_Scope
)
View Source
const (
	StopSignal = iota
)

Variables

This section is empty.

Functions

func NewExtractPushDownRule

func NewExtractPushDownRule() *extractPushDownRule

func NewPruneColumn

func NewPruneColumn() *pruneColumn

func NewStopPushdownRule

func NewStopPushdownRule() *stopPushdownRule

Types

type Aggregate

type Aggregate struct {
	Name  string
	FName string
	Agg   expr.Expr
	Es    []expr.Expr
}

type Build

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

func New

func New(spl string, fs vfs.FS, e engine.Engine) *Build

func (*Build) Build

func (b *Build) Build() (*Plan, error)

type Direction

type Direction int8

Direction for ordering results.

const (
	DefaultDirection Direction = iota
	Ascending
	Descending
)

Direction values.

func (Direction) String

func (i Direction) String() string

type Extract

type Extract struct {
	// E is the expression(columnname) to extract.
	E    expr.Expr
	Lua  string
	Cols []int
}

func (*Extract) String

func (n *Extract) String() string

type Filter

type Filter struct {
	Filter expr.Expr
}

func (*Filter) String

func (n *Filter) String() string

type Group

type Group struct {
	GroupBy []expr.Expr
	AggList []Aggregate
}

func (*Group) String

func (n *Group) String() string

type Import

type Import struct {
	Paths []string
}

func (*Import) String

func (n *Import) String() string

type Limit

type Limit struct {
	Limit int64
}

func (*Limit) String

func (n *Limit) String() string

type Order

type Order struct {
	Limit  int64
	Orders []OrderBySpec
}

func (*Order) String

func (n *Order) String() string

type OrderBySpec

type OrderBySpec struct {
	E    expr.Expr
	Type Direction
}

func (OrderBySpec) String

func (n OrderBySpec) String() string

type Plan

type Plan struct {
	Root *Scope
}

type Projection

type Projection struct {
	ProjectionList []expr.Expr
}

func (*Projection) String

func (n *Projection) String() string

type Rule

type Rule interface {
	// ID returns the unique identifier for the rule.
	ID() uint64
	Name() string
	Apply(*Scope) *Scope
}

type Scan

type Scan struct {
	Extract *Extract
}

func (*Scan) String

func (n *Scan) String() string

type Scope

type Scope struct {
	ScopeType int

	Scan       *Scan
	Limit      *Limit
	Order      *Order
	Group      *Group
	Import     *Import
	Filter     *Filter
	Extract    *Extract
	Projection *Projection

	Signals []*Scope

	Parent   *Scope
	Children []*Scope
	Attrs    []ScopeAttribute
	// contains filtered or unexported fields
}

func Optimize

func Optimize(root *Scope) *Scope

func (*Scope) String

func (s *Scope) String() string

type ScopeAttribute

type ScopeAttribute struct {
	// ID is an identifier for this attribute, which is unique across all
	// the attributes in the query.
	ID   uint32
	Name string
	Type types.Type
}

type State

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

Jump to

Keyboard shortcuts

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