Documentation
¶
Index ¶
- Variables
- func FanIn(op Op) int
- func IsThis(e Expr) bool
- func IsTopLevelField(e Expr) bool
- func TopLevelField(e Expr) (string, bool)
- func UnpackJSON(buf []byte) (interface{}, error)
- type Agg
- type ArrayExpr
- type Assignment
- type BinaryExpr
- type Call
- type Case
- type CommitMeta
- type Conditional
- type Cut
- type Def
- type Dot
- type Drop
- type Entry
- type Explode
- type Expr
- type Field
- type File
- type Filter
- type From
- type Func
- type Fuse
- type HTTP
- type Head
- type Join
- type KeyFilter
- type LakeMeta
- type Let
- type Literal
- type MapExpr
- type Merge
- type Method
- type Op
- type Over
- type OverExpr
- type Parallel
- type Pass
- type Pick
- type Pool
- type PoolMeta
- type Put
- type RecordElem
- type RecordExpr
- type RegexpMatch
- type RegexpSearch
- type Rename
- type Search
- type Sequential
- type SetExpr
- type Shape
- type Sort
- type Source
- type Spread
- type Summarize
- type Switch
- type Tail
- type This
- type Top
- type Trunk
- type UnaryExpr
- type Uniq
- type Var
- type VectorElem
- type VectorValue
- type Yield
Constants ¶
This section is empty.
Variables ¶
var PassOp = &Pass{Kind: "Pass"}
Functions ¶
func IsTopLevelField ¶ added in v1.0.0
func TopLevelField ¶ added in v1.0.0
func UnpackJSON ¶
Types ¶
type Agg ¶
type ArrayExpr ¶
type ArrayExpr struct {
Kind string `json:"kind" unpack:""`
Elems []VectorElem `json:"elems"`
}
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 CommitMeta ¶
type CommitMeta struct {
Kind string `json:"kind" unpack:""`
Pool ksuid.KSUID `json:"pool"`
Commit ksuid.KSUID `json:"branch"`
Meta string `json:"meta"`
ScanLower Expr `json:"scan_lower"`
ScanUpper Expr `json:"scan_upper"`
ScanOrder string `json:"scan_order"`
}
func (*CommitMeta) Source ¶
func (*CommitMeta) Source()
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"`
}
type Dot ¶
type Explode ¶
type File ¶
type Filter ¶
func FilterToOp ¶
type Func ¶ added in v1.4.0
type HTTP ¶
type Join ¶
type Join struct {
Kind string `json:"kind" unpack:""`
Style string `json:"style"`
LeftKey Expr `json:"left_key"`
RightKey Expr `json:"right_key"`
Args []Assignment `json:"args"`
}
type KeyFilter ¶ added in v1.3.0
type KeyFilter struct {
Expr Expr
}
func NewKeyFilter ¶ added in v1.3.0
NewKeyFilter creates a KeyFilter that contains a modified form of node where only predicates operating on key are kept. The underlying expression is rewritten in a manner so that results produced by the filter will always be a superset of the results produced by the parent filter (i.e., it will not filter values that would not be not also filtered by the original filter). Currently KeyFilter only recognizes simple key predicates against a literal value and using the comparators ==, >=, >, <, and <=; otherwise the predicate is ignored.
func (*KeyFilter) CroppedByExpr ¶ added in v1.3.0
func (*KeyFilter) SpanExpr ¶ added in v1.3.0
SpanExpr creates an Expr that returns true if the KeyFilter has a value within a span of values. The span compared against must be a record with the fields "lower" and "upper", where "lower" is the inclusive lower bounder and "upper" is the exclusive upper bound.
type Let ¶ added in v1.0.0
type Merge ¶
type Op ¶
type Op interface {
OpNode()
}
func UnpackJSONAsOp ¶
UnpackJSONAsOp transforms a JSON representation of an operator into an dag.Op.
func UnpackMapAsOp ¶
type Over ¶ added in v1.0.0
type Over struct {
Kind string `json:"kind" unpack:""`
Exprs []Expr `json:"exprs"`
Scope *Sequential `json:"scope"`
}
type OverExpr ¶ added in v1.1.0
type OverExpr struct {
Kind string `json:"kind" unpack:""`
Defs []Def `json:"defs"`
Exprs []Expr `json:"exprs"`
Scope *Sequential `json:"scope"`
}
type Pick ¶
type Pick struct {
Kind string `json:"kind" unpack:""`
Args []Assignment `json:"args"`
}
type Pool ¶
type PoolMeta ¶
type Put ¶
type Put struct {
Kind string `json:"kind" unpack:""`
Args []Assignment `json:"args"`
}
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"`
}
type Search ¶
type Sequential ¶
type Sequential struct {
Kind string `json:"kind" unpack:""`
Consts []Def `json:"consts"`
Funcs []*Func `json:"funcs"`
Ops []Op `json:"ops"`
}
func (*Sequential) Append ¶
func (seq *Sequential) Append(op Op)
func (*Sequential) Delete ¶
func (seq *Sequential) Delete(at, length int)
func (*Sequential) IsEntry ¶
func (seq *Sequential) IsEntry() bool
func (*Sequential) OpNode ¶
func (*Sequential) OpNode()
func (*Sequential) Prepend ¶
func (seq *Sequential) Prepend(front Op)
type SetExpr ¶
type SetExpr struct {
Kind string `json:"kind" unpack:""`
Elems []VectorElem `json:"elems"`
}
type Sort ¶
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"`
}
type Switch ¶
type Top ¶
type Trunk ¶
type Trunk struct {
Kind string `json:"kind" unpack:""`
Source Source `json:"source"`
Seq *Sequential `json:"seq"`
Pushdown Op `json:"pushdown"`
}
A Trunk is the path into a DAG for any input source. It contains the source to scan as well as the sequential operators to apply to the scan before being joined, merged, or output. A DAG can be just one Trunk or an assembly of different Trunks mixed in using the From Op. The Trunk is the one place where the optimizer places pushed down predicates so the runtime can move the pushed down operators into each scan scheduler for each source when the runtime is built. When computation is distribtued over the network, the optimized pushdown is naturally carried in the serialized DAG via each Trunk.
type UnaryExpr ¶
type Var ¶ added in v1.0.0
type VectorElem ¶ added in v1.2.0
type VectorElem interface {
// contains filtered or unexported methods
}