dag

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: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommitMetas = map[string]struct{}{
	"log":        {},
	"objects":    {},
	"partitions": {},
	"rawlog":     {},
	"vectors":    {},
}
View Source
var LakeMetas = map[string]struct{}{
	"branches": {},
	"pools":    {},
}
View Source
var PassOp = &Pass{Kind: "Pass"}
View Source
var PoolMetas = map[string]struct{}{
	"branches": {},
}

Functions

func FanIn

func FanIn(seq Seq) int

func IsThis added in v1.0.0

func IsThis(e Expr) bool

func IsTopLevelField added in v1.0.0

func IsTopLevelField(e Expr) bool

func TopLevelField added in v1.0.0

func TopLevelField(e Expr) (string, bool)

Types

type Agg

type Agg struct {
	Kind  string `json:"kind" unpack:""`
	Name  string `json:"name"`
	Expr  Expr   `json:"expr"`
	Where Expr   `json:"where"`
}

func (*Agg) ExprDAG

func (*Agg) ExprDAG()

type ArrayExpr

type ArrayExpr struct {
	Kind  string       `json:"kind" unpack:""`
	Elems []VectorElem `json:"elems"`
}

func (*ArrayExpr) ExprDAG

func (*ArrayExpr) ExprDAG()

type Assignment

type Assignment struct {
	Kind string `json:"kind" unpack:""`
	LHS  Expr   `json:"lhs"`
	RHS  Expr   `json:"rhs"`
}

func (*Assignment) ExprDAG

func (*Assignment) ExprDAG()

type BinaryExpr

type BinaryExpr struct {
	Kind string `json:"kind" unpack:""`
	Op   string `json:"op"`
	LHS  Expr   `json:"lhs"`
	RHS  Expr   `json:"rhs"`
}

func NewBinaryExpr added in v1.3.0

func NewBinaryExpr(op string, lhs, rhs Expr) *BinaryExpr

func (*BinaryExpr) ExprDAG

func (*BinaryExpr) ExprDAG()

type Call

type Call struct {
	Kind string `json:"kind" unpack:""`
	Name string `json:"name"`
	Args []Expr `json:"args"`
}

func (*Call) ExprDAG

func (*Call) ExprDAG()

type Case

type Case struct {
	Expr Expr `json:"expr"`
	Path Seq  `json:"seq"`
}

type Combine added in v1.8.0

type Combine struct {
	Kind string `json:"kind" unpack:""`
}

func (*Combine) OpNode added in v1.8.0

func (*Combine) OpNode()

type CommitMetaScan added in v1.8.0

type CommitMetaScan struct {
	Kind      string      `json:"kind" unpack:""`
	Pool      ksuid.KSUID `json:"pool"`
	Commit    ksuid.KSUID `json:"commit"`
	Meta      string      `json:"meta"`
	Tap       bool        `json:"tap"`
	KeyPruner Expr        `json:"key_pruner"`
}

func (*CommitMetaScan) OpNode added in v1.8.0

func (*CommitMetaScan) OpNode()

type Conditional

type Conditional struct {
	Kind string `json:"kind" unpack:""`
	Cond Expr   `json:"cond"`
	Then Expr   `json:"then"`
	Else Expr   `json:"else"`
}

func (*Conditional) ExprDAG

func (*Conditional) ExprDAG()

type Cut

type Cut struct {
	Kind  string       `json:"kind" unpack:""`
	Args  []Assignment `json:"args"`
	Quiet bool         `json:"quiet"`
}

func (*Cut) OpNode

func (*Cut) OpNode()

type Def added in v1.0.0

type Def struct {
	Name string `json:"name"`
	Expr Expr   `json:"expr"`
}

type DefaultScan added in v1.12.0

type DefaultScan struct {
	Kind    string        `json:"kind" unpack:""`
	Filter  Expr          `json:"filter"`
	SortKey order.SortKey `json:"sort_key"`
}

DefaultScan scans an input stream provided by the runtime.

func (*DefaultScan) OpNode added in v1.12.0

func (*DefaultScan) OpNode()

type DeleteScan added in v1.8.0

type DeleteScan struct {
	Kind   string      `json:"kind" unpack:""`
	ID     ksuid.KSUID `json:"id"`
	Commit ksuid.KSUID `json:"commit"`
}

func (*DeleteScan) OpNode added in v1.8.0

func (*DeleteScan) OpNode()

type Deleter added in v1.8.0

type Deleter struct {
	Kind      string      `json:"kind" unpack:""`
	Pool      ksuid.KSUID `json:"pool"`
	Where     Expr        `json:"where"`
	KeyPruner Expr        `json:"key_pruner"`
}

func (*Deleter) OpNode added in v1.8.0

func (*Deleter) OpNode()

type Dot

type Dot struct {
	Kind string `json:"kind" unpack:""`
	LHS  Expr   `json:"lhs"`
	RHS  string `json:"rhs"`
}

func (*Dot) ExprDAG

func (*Dot) ExprDAG()

type Drop

type Drop struct {
	Kind string `json:"kind" unpack:""`
	Args []Expr `json:"args"`
}

func (*Drop) OpNode

func (*Drop) OpNode()

type Entry

type Entry struct {
	Key   Expr `json:"key"`
	Value Expr `json:"value"`
}

type Explode

type Explode struct {
	Kind string `json:"kind" unpack:""`
	Args []Expr `json:"args"`
	Type string `json:"type"`
	As   string `json:"as"`
}

func (*Explode) OpNode

func (*Explode) OpNode()

type Expr

type Expr interface {
	ExprDAG()
}

type Field

type Field struct {
	Kind  string `json:"kind" unpack:""`
	Name  string `json:"name"`
	Value Expr   `json:"value"`
}

type FileScan added in v1.8.0

type FileScan struct {
	Kind    string        `json:"kind" unpack:""`
	Path    string        `json:"path"`
	Format  string        `json:"format"`
	SortKey order.SortKey `json:"sort_key"`
	Filter  Expr          `json:"filter"`
}

func (*FileScan) OpNode added in v1.8.0

func (*FileScan) OpNode()

type Filter

type Filter struct {
	Kind string `json:"kind" unpack:""`
	Expr Expr   `json:"expr"`
}

func NewFilter added in v1.6.0

func NewFilter(e Expr) *Filter

NewFilter returns a filter node for e.

func (*Filter) OpNode

func (*Filter) OpNode()

type Fork added in v1.8.0

type Fork struct {
	Kind  string `json:"kind" unpack:""`
	Paths []Seq  `json:"paths"`
}

func (*Fork) OpNode added in v1.8.0

func (*Fork) OpNode()

type Func added in v1.4.0

type Func struct {
	Kind   string   `json:"func" unpack:""`
	Name   string   `json:"name"`
	Params []string `json:"params"`
	Expr   Expr     `json:"expr"`
}

func (*Func) ExprDAG added in v1.4.0

func (*Func) ExprDAG()

type Fuse

type Fuse struct {
	Kind string `json:"kind" unpack:""`
}

func (*Fuse) OpNode

func (*Fuse) OpNode()

type HTTPScan added in v1.8.0

type HTTPScan struct {
	Kind    string              `json:"kind" unpack:""`
	URL     string              `json:"url"`
	Format  string              `json:"format"`
	SortKey order.SortKey       `json:"sort_key"`
	Method  string              `json:"method"`
	Headers map[string][]string `json:"headers"`
	Body    string              `json:"body"`
}

func (*HTTPScan) OpNode added in v1.8.0

func (*HTTPScan) OpNode()
type Head struct {
	Kind  string `json:"kind" unpack:""`
	Count int    `json:"count"`
}

func (*Head) OpNode

func (*Head) OpNode()

type Join

type Join struct {
	Kind     string          `json:"kind" unpack:""`
	Style    string          `json:"style"`
	LeftKey  Expr            `json:"left_key"`
	LeftDir  order.Direction `json:"left_dir"`
	RightKey Expr            `json:"right_key"`
	RightDir order.Direction `json:"right_dir"`
	Args     []Assignment    `json:"args"`
}

func (*Join) OpNode

func (*Join) OpNode()

type LakeMetaScan added in v1.8.0

type LakeMetaScan struct {
	Kind string `json:"kind" unpack:""`
	Meta string `json:"meta"`
}

func (*LakeMetaScan) OpNode added in v1.8.0

func (*LakeMetaScan) OpNode()

type Lister added in v1.8.0

type Lister struct {
	Kind      string      `json:"kind" unpack:""`
	Pool      ksuid.KSUID `json:"pool"`
	Commit    ksuid.KSUID `json:"commit"`
	KeyPruner Expr        `json:"key_pruner"`
}

func (*Lister) OpNode added in v1.8.0

func (*Lister) OpNode()

type Literal added in v1.0.0

type Literal struct {
	Kind  string `json:"kind" unpack:""`
	Value string `json:"value"`
}

func (*Literal) ExprDAG added in v1.0.0

func (*Literal) ExprDAG()

type Load added in v1.8.0

type Load struct {
	Kind    string      `json:"kind" unpack:""`
	Pool    ksuid.KSUID `json:"pool"`
	Branch  string      `json:"branch"`
	Author  string      `json:"author"`
	Message string      `json:"message"`
	Meta    string      `json:"meta"`
}

func (*Load) OpNode added in v1.8.0

func (*Load) OpNode()

type MapCall added in v1.11.0

type MapCall struct {
	Kind  string `json:"kind" unpack:""`
	Expr  Expr   `json:"expr"`
	Inner Expr   `json:"inner"`
}

func (*MapCall) ExprDAG added in v1.11.0

func (*MapCall) ExprDAG()

type MapExpr

type MapExpr struct {
	Kind    string  `json:"kind" unpack:""`
	Entries []Entry `json:"entries"`
}

func (*MapExpr) ExprDAG

func (*MapExpr) ExprDAG()

type Merge

type Merge struct {
	Kind  string      `json:"kind" unpack:""`
	Expr  Expr        `json:"expr"`
	Order order.Which `json:"order"`
}

func (*Merge) OpNode

func (*Merge) OpNode()

type Op

type Op interface {
	OpNode()
}

func UnmarshalOp added in v1.8.0

func UnmarshalOp(buf []byte) (Op, error)

UnmarshalOp transforms a JSON representation of an operator into an Op.

type Over added in v1.0.0

type Over struct {
	Kind  string `json:"kind" unpack:""`
	Defs  []Def  `json:"defs"`
	Exprs []Expr `json:"exprs"`
	Vars  []Def  `json:"vars"`
	Body  Seq    `json:"body"`
}

func (*Over) OpNode added in v1.0.0

func (*Over) OpNode()

type OverExpr added in v1.1.0

type OverExpr struct {
	Kind  string `json:"kind" unpack:""`
	Defs  []Def  `json:"defs"`
	Exprs []Expr `json:"exprs"`
	Body  Seq    `json:"body"`
}

func (*OverExpr) ExprDAG added in v1.1.0

func (*OverExpr) ExprDAG()

type Pass

type Pass struct {
	Kind string `json:"kind" unpack:""`
}

func (*Pass) OpNode

func (*Pass) OpNode()

type PoolMetaScan added in v1.8.0

type PoolMetaScan struct {
	Kind string      `json:"kind" unpack:""`
	ID   ksuid.KSUID `json:"id"`
	Meta string      `json:"meta"`
}

func (*PoolMetaScan) OpNode added in v1.8.0

func (*PoolMetaScan) OpNode()

type PoolScan added in v1.8.0

type PoolScan struct {
	Kind   string      `json:"kind" unpack:""`
	ID     ksuid.KSUID `json:"id"`
	Commit ksuid.KSUID `json:"commit"`
}

func (*PoolScan) OpNode added in v1.8.0

func (*PoolScan) OpNode()

type Put

type Put struct {
	Kind string       `json:"kind" unpack:""`
	Args []Assignment `json:"args"`
}

func (*Put) OpNode

func (*Put) OpNode()

type RecordElem added in v1.0.0

type RecordElem interface {
	// contains filtered or unexported methods
}

type RecordExpr

type RecordExpr struct {
	Kind  string       `json:"kind" unpack:""`
	Elems []RecordElem `json:"elems"`
}

func (*RecordExpr) ExprDAG

func (*RecordExpr) ExprDAG()

type RegexpMatch

type RegexpMatch struct {
	Kind    string `json:"kind" unpack:""`
	Pattern string `json:"pattern"`
	Expr    Expr   `json:"expr"`
}

func (*RegexpMatch) ExprDAG

func (*RegexpMatch) ExprDAG()

type RegexpSearch

type RegexpSearch struct {
	Kind    string `json:"kind" unpack:""`
	Pattern string `json:"pattern"`
	Expr    Expr   `json:"expr"`
}

func (*RegexpSearch) ExprDAG

func (*RegexpSearch) ExprDAG()

type Rename

type Rename struct {
	Kind string       `json:"kind" unpack:""`
	Args []Assignment `json:"args"`
}

func (*Rename) OpNode

func (*Rename) OpNode()

type Scatter added in v1.8.0

type Scatter struct {
	Kind  string `json:"kind" unpack:""`
	Paths []Seq  `json:"paths"`
}

func (*Scatter) OpNode added in v1.8.0

func (*Scatter) OpNode()

type Scope added in v1.8.0

type Scope struct {
	Kind   string  `json:"kind" unpack:""`
	Consts []Def   `json:"consts"`
	Funcs  []*Func `json:"funcs"`
	Body   Seq     `json:"seq"`
}

func (*Scope) OpNode added in v1.8.0

func (*Scope) OpNode()
type Search struct {
	Kind  string `json:"kind" unpack:""`
	Text  string `json:"text"`
	Value string `json:"value"`
	Expr  Expr   `json:"expr"`
}

func (*Search) ExprDAG

func (*Search) ExprDAG()

type Seq added in v1.8.0

type Seq []Op

func (*Seq) Append added in v1.8.0

func (seq *Seq) Append(op Op)

func (*Seq) Delete added in v1.8.0

func (seq *Seq) Delete(from, to int)

func (*Seq) Prepend added in v1.8.0

func (seq *Seq) Prepend(front Op)

type SeqScan added in v1.8.0

type SeqScan struct {
	Kind      string       `json:"kind" unpack:""`
	Pool      ksuid.KSUID  `json:"pool"`
	Commit    ksuid.KSUID  `json:"commit"`
	Fields    []field.Path `json:"fields"`
	Filter    Expr         `json:"filter"`
	KeyPruner Expr         `json:"key_pruner"`
}

func (*SeqScan) OpNode added in v1.8.0

func (*SeqScan) OpNode()

type SetExpr

type SetExpr struct {
	Kind  string       `json:"kind" unpack:""`
	Elems []VectorElem `json:"elems"`
}

func (*SetExpr) ExprDAG

func (*SetExpr) ExprDAG()

type Shape

type Shape struct {
	Kind string `json:"kind" unpack:""`
}

func (*Shape) OpNode

func (*Shape) OpNode()

type Slicer added in v1.8.0

type Slicer struct {
	Kind string `json:"kind" unpack:""`
}

func (*Slicer) OpNode added in v1.8.0

func (*Slicer) OpNode()

type Sort

type Sort struct {
	Kind       string      `json:"kind" unpack:""`
	Args       []Expr      `json:"args"`
	Order      order.Which `json:"order"`
	NullsFirst bool        `json:"nullsfirst"`
}

func (*Sort) OpNode

func (*Sort) OpNode()

type Spread added in v1.0.0

type Spread struct {
	Kind string `json:"kind" unpack:""`
	Expr Expr   `json:"expr"`
}

type Summarize

type Summarize struct {
	Kind         string       `json:"kind" unpack:""`
	Limit        int          `json:"limit"`
	Keys         []Assignment `json:"keys"`
	Aggs         []Assignment `json:"aggs"`
	InputSortDir int          `json:"input_sort_dir,omitempty"`
	PartialsIn   bool         `json:"partials_in,omitempty"`
	PartialsOut  bool         `json:"partials_out,omitempty"`
}

func (*Summarize) OpNode

func (*Summarize) OpNode()

type Switch

type Switch struct {
	Kind  string `json:"kind" unpack:""`
	Expr  Expr   `json:"expr"`
	Cases []Case `json:"cases"`
}

func (*Switch) OpNode

func (*Switch) OpNode()

type Tail

type Tail struct {
	Kind  string `json:"kind" unpack:""`
	Count int    `json:"count"`
}

func (*Tail) OpNode

func (*Tail) OpNode()

type This added in v1.0.0

type This struct {
	Kind string   `json:"kind" unpack:""`
	Path []string `json:"path"`
}

func (*This) ExprDAG added in v1.0.0

func (*This) ExprDAG()

func (*This) String added in v1.0.0

func (t *This) String() string

type Top

type Top struct {
	Kind  string `json:"kind" unpack:""`
	Limit int    `json:"limit"`
	Args  []Expr `json:"args"`
	Flush bool   `json:"flush"`
}

func (*Top) OpNode

func (*Top) OpNode()

type UnaryExpr

type UnaryExpr struct {
	Kind    string `json:"kind" unpack:""`
	Op      string `json:"op"`
	Operand Expr   `json:"operand"`
}

func (*UnaryExpr) ExprDAG

func (*UnaryExpr) ExprDAG()

type Uniq

type Uniq struct {
	Kind  string `json:"kind" unpack:""`
	Cflag bool   `json:"cflag"`
}

func (*Uniq) OpNode

func (*Uniq) OpNode()

type Var added in v1.0.0

type Var struct {
	Kind string `json:"kind" unpack:""`
	Name string `json:"name"`
	Slot int    `json:"slot"`
}

func (*Var) ExprDAG added in v1.0.0

func (*Var) ExprDAG()

type VectorElem added in v1.2.0

type VectorElem interface {
	// contains filtered or unexported methods
}

type VectorValue added in v1.2.0

type VectorValue struct {
	Kind string `json:"kind" unpack:""`
	Expr Expr   `json:"expr"`
}

type Vectorize added in v1.12.0

type Vectorize struct {
	Kind string `json:"kind" unpack:""`
	Body Seq    `json:"body"`
}

Vectorize executes its body using the vector engine.

func (*Vectorize) OpNode added in v1.12.0

func (*Vectorize) OpNode()

type Yield added in v1.0.0

type Yield struct {
	Kind  string `json:"kind" unpack:""`
	Exprs []Expr `json:"exprs"`
}

func (*Yield) OpNode added in v1.0.0

func (*Yield) OpNode()

Jump to

Keyboard shortcuts

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