optimizer

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldsOf added in v1.15.0

func FieldsOf(e dag.Expr) (field.List, bool)

func InferDemandSeqOut added in v1.11.0

func InferDemandSeqOut(seq dag.Seq) map[dag.Op]demand.Demand

Returns a map from op to the demand on the output of that op.

func IsCountByString added in v1.12.0

func IsCountByString(o dag.Op) (string, bool)

IsCountByString returns whether o represents "count() by <top-level field>" along with the field name.

func IsSum added in v1.12.0

func IsSum(o dag.Op) (string, bool)

IsSum return whether o represents "sum(<top-level field>)" along with the field name.

Types

type Optimizer

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

func New

func New(ctx context.Context, source *data.Source) *Optimizer

func (*Optimizer) Optimize added in v1.8.0

func (o *Optimizer) Optimize(seq dag.Seq) (dag.Seq, error)

Optimize transforms the DAG by attempting to lift stateless operators from the downstream sequence into the trunk of each data source in the From operator at the entry point of the DAG. Once these paths are lifted, it also attempts to move any candidate filtering operations into the source's pushdown predicate. This should be called before ParallelizeScan(). TBD: we need to do pushdown for search/cut to optimize columnar extraction.

func (*Optimizer) OptimizeDeleter added in v1.8.0

func (o *Optimizer) OptimizeDeleter(seq dag.Seq, replicas int) (dag.Seq, error)

func (*Optimizer) Parallelize

func (o *Optimizer) Parallelize(seq dag.Seq, n int) (dag.Seq, error)

Parallelize tries to parallelize the DAG by splitting each source path as much as possible of the sequence into n parallel branches.

func (*Optimizer) Vectorize added in v1.12.0

func (o *Optimizer) Vectorize(seq dag.Seq) (dag.Seq, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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