pipeline

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

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

Pipeline contains the information associated with a pipeline in a query execution plan. A query execution plan may contains one or more pipelines. As an example:

 CREATE TABLE order
 (
       order_id    INT,
       uid          INT,
       item_id      INT,
       year         INT,
       nation       VARCHAR(100)
 );

 CREATE TABLE customer
 (
       uid          INT,
       nation       VARCHAR(100),
       city         VARCHAR(100)
 );

 CREATE TABLE supplier
 (
       item_id      INT,
       nation       VARCHAR(100),
       city         VARCHAR(100)
 );

	SELECT c.city, s.city, sum(o.revenue) AS revenue
 FROM customer c, order o, supplier s
 WHERE o.uid = c.uid
 AND o.item_id = s.item_id
 AND c.nation = 'CHINA'
 AND s.nation = 'CHINA'
 AND o.year >= 1992 and o.year <= 1997
 GROUP BY c.city, s.city, o.year
 ORDER BY o.year asc, revenue desc;

 AST PLAN:
    order
      |
    group
      |
    filter
      |
    join
    /  \
   s   join
       /  \
      l   c

In this example, a possible pipeline is as follows:

pipeline: o ⨝ c ⨝ s

-> σ(c.nation = 'CHINA' ∧  o.year >= 1992 ∧  o.year <= 1997 ∧  s.nation = 'CHINA')
-> γ([c.city, s.city, o.year, sum(o.revenue) as revenue], c.city, s.city, o.year)
-> τ(o.year asc, revenue desc)
-> π(c.city, s.city, revenue)

func New

func New(attrs []string, ins vm.Instructions, reg *process.WaitRegister) *Pipeline

func NewMerge

func NewMerge(ins vm.Instructions, reg *process.WaitRegister) *Pipeline

func (*Pipeline) ConstRun added in v0.5.0

func (p *Pipeline) ConstRun(bat *batch.Batch, proc *process.Process) (bool, error)

func (*Pipeline) MergeRun added in v0.5.0

func (p *Pipeline) MergeRun(proc *process.Process) (bool, error)

func (*Pipeline) Run

func (p *Pipeline) Run(r engine.Reader, proc *process.Process) (bool, error)

func (*Pipeline) String

func (p *Pipeline) String() string

Jump to

Keyboard shortcuts

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