plan

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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 BuildParams

type BuildParams struct {
	SeqQL *parser.SeqQLQuery

	// Input is the record schema the pipeline starts from
	Input *query.Schema
	// DocField is the title of document field in Input.
	// We still keep some hardcoded params. Will ger rid of it later.
	DocField string

	From, To  seq.MID
	OffsetID  string
	WithTotal bool
}

type ExtractOp

type ExtractOp struct {
	Fields []string
	// OpField is the name of the column to perform operation on.
	OpField string
}

func (*ExtractOp) Apply

type FilterOp

type FilterOp struct {
	Cond      parser.FilterCondition
	WithTotal bool
}

func (*FilterOp) Apply

type LimitOp

type LimitOp struct {
	Limit  int
	Offset int
}

func (*LimitOp) Apply

type Op

type Op interface {
	// Apply wraps the input producer and returns it with the op's output schema.
	// Ops that do not change the record shape return the input schema unchanged.
	Apply(input query.RecordProducer, in *query.Schema) (query.RecordProducer, *query.Schema)
}

Op is one operation wrapping the record stream. Each op has its own parameters, resolves its input columns from the schema of the pipeline built so far, and knows its output schema.

type Plan

type Plan struct {
	Scan   Scan
	Ops    []Op
	Schema *query.Schema
}

func Build

func Build(params BuildParams) (*Plan, error)

Build converts a parsed SeqQL query into a validated logical plan.

func (*Plan) IsAgg

func (p *Plan) IsAgg() bool

type ProjectOp

type ProjectOp struct {
	Fields    []string
	AllowList bool
	// OpField is the name of the column to perform operation on.
	OpField string
}

func (*ProjectOp) Apply

type Scan

type Scan struct {
	AST *parser.ASTNode

	From, To  seq.MID
	Order     seq.DocsOrder
	WithTotal bool

	AggQ []processor.AggQuery

	OffsetID seq.ID
}

Scan describes the datasource.

Jump to

Keyboard shortcuts

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