Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/engine/planner/physical/projection.go

36 lines
997 B

package physical
import "fmt"
// Projection represents a column selection operation in the physical plan.
// It contains a list of columns (column expressions) that are later
// evaluated against the input columns to remove unnecessary colums from the
// intermediate result.
type Projection struct {
id string
// Columns is a set of column expressions that are used to drop not needed
// columns that do not match the expression evaluation.
Columns []ColumnExpression
}
// ID implements the [Node] interface.
// Returns a string that uniquely identifies the node in the plan.
func (p *Projection) ID() string {
if p.id == "" {
return fmt.Sprintf("%p", p)
}
return p.id
}
// Type implements the [Node] interface.
// Returns the type of the node.
func (*Projection) Type() NodeType {
return NodeTypeProjection
}
// Accept implements the [Node] interface.
// Dispatches itself to the provided [Visitor] v
func (p *Projection) Accept(v Visitor) error {
return v.VisitProjection(p)
}