kernel

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: BSD-3-Clause Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJoinParents = errors.New("join requires two upstream parallel query paths")

Functions

func CompileAssignment

func CompileAssignment(zctx *zed.Context, scope *Scope, node *dag.Assignment) (expr.Assignment, error)

func CompileAssignments

func CompileAssignments(dsts field.List, srcs field.List) (field.List, []expr.Evaluator)

func CompileBufferFilter

func CompileBufferFilter(e dag.Expr) (*expr.BufferFilter, error)

CompileBufferFilter tries to return a BufferFilter for e such that the BufferFilter's Eval method returns true for any byte slice containing the ZNG encoding of a record matching e. (It may also return true for some byte slices that do not match.) compileBufferFilter returns a nil pointer and nil error if it cannot construct a useful filter.

func CompileExprs

func CompileExprs(zctx *zed.Context, scope *Scope, nodes []dag.Expr) ([]expr.Evaluator, error)

func CompileFilter

func CompileFilter(zctx *zed.Context, scope *Scope, node dag.Expr) (expr.Filter, error)

Types

type Binder

type Binder map[string]*zed.Value

XXX for now, Binder is just a map of identifiers to a specific zed.Value reference that the name refers to. This will be generalized later to handle all possible types of identifier bindings.

func NewBinder

func NewBinder() Binder

func (Binder) Define

func (b Binder) Define(name string, ref *zed.Value)

type Builder

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

func NewBuilder

func NewBuilder(pctx *proc.Context, adaptor proc.DataAdaptor) *Builder

func (*Builder) Build

func (b *Builder) Build(seq *dag.Sequential) ([]proc.Interface, error)

func (*Builder) CompileFilter

func (b *Builder) CompileFilter(e dag.Expr) (expr.Filter, error)

func (*Builder) LoadConsts

func (b *Builder) LoadConsts(ops []dag.Op) error

func (*Builder) PushdownOf

func (b *Builder) PushdownOf(trunk *dag.Trunk) (*Filter, error)

func (*Builder) Schedulers

func (b *Builder) Schedulers() []proc.Scheduler

type Filter

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

func (*Filter) AsBufferFilter

func (f *Filter) AsBufferFilter() (*expr.BufferFilter, error)

func (*Filter) AsFilter

func (f *Filter) AsFilter() (expr.Filter, error)

type Reader

type Reader struct {
	Layout  order.Layout
	Readers []zio.Reader
}

func (*Reader) Source

func (*Reader) Source()

type Scope

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

A Scope is a stack of bindings that map identifiers to literals, generator variables, functions etc. Currently, we only handle iterators but this will change soone as we add support for richer Zed script semantics.

func NewScope

func NewScope() *Scope

func (*Scope) Bind

func (s *Scope) Bind(name string, ref *zed.Value)

func (*Scope) Enter

func (s *Scope) Enter()

func (*Scope) Exit

func (s *Scope) Exit()

func (*Scope) Lookup

func (s *Scope) Lookup(name string) *zed.Value

Jump to

Keyboard shortcuts

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