# Functions
EvaluatorUnsupportedType is a helper for signaling that an evaluator does not support an Expr type.
GetRangeType returns whether a query is an instant query or range query.
JoinCountMinSketchVector joins the results from stepEvaluator into a CountMinSketchVector.
JoinQuantileSketchVector joins the results from stepEvaluator into a ProbabilisticQuantileMatrix.
MatchForSeriesRequest extracts and parses multiple matcher groups from a slice of strings.
NewBufferedAccumulator returns an accumulator which aggregates all query results in a slice.
NewConcatStepEvaluator joins multiple StepEvaluators.
NewDefaultEvaluator constructs a DefaultEvaluator.
NewDownstreamEngine constructs a *DownstreamEngine.
NewEngine creates a new LogQL Engine.
NewRangeMapper creates a new RangeMapper instance with the given duration as split interval.
NewRangeMapperWithSplitAlign is similar to `NewRangeMapper` except it accepts additional `splitAlign` argument and used to align the subqueries generated according to that.
NewResultStepEvaluator coerces a downstream vector or matrix into a StepEvaluator.
NewStreamAccumulator returns an accumulator for limited log queries.
NewTree creates a tree printer and returns a sentinel node reference which should be used to add the root.
ParseShards parses a list of string encoded shards.
Quantile calculates the given Quantile of a vector of samples.
ResultIterator coerces a downstream streams result into an iter.EntryIterator.
Sortable logql contain sort or sort_desc.
# Constants
TODO(owen-d): refactor this file.
parsing evaluation result used in metrics.
MaxChildrenDisplay defines the maximum number of children that should be shown by explain.
expression type used in metrics.
parsing evaluation result used in metrics.
TODO(owen-d): refactor this file.
expression type used in metrics.
parsing evaluation result used in metrics.
# Structs
heap impl for keeping only the top n results across m streams importantly, AccumulatedStreams is _bounded_, so it will only store the top `limit` results across all streams.
ConcatLogSelectorExpr is an expr for concatenating multiple LogSelectorExpr.
ConcatSampleExpr is an expr for concatenating multiple SampleExpr Contract: The embedded SampleExprs within a linked list of ConcatSampleExprs must be of the same structure.
CountMinSketchVector tracks the count or sum of values of a metric, ie list of label value pairs.
CountMinSketchVectorStepEvaluator evaluates a count min sketch into a promql.Vector.
DownstreamEngine is an Engine implementation that can split queries into more parallelizable forms via querying the underlying backend shards individually and re-aggregating them.
DownstreamEvaluator is an evaluator which handles shard aware AST nodes.
DownstreamLogSelectorExpr is a LogSelectorExpr which signals downstream computation.
DownstreamSampleExpr is a SampleExpr which signals downstream computation.
Engine is the LogQL engine.
EngineOpts is the list of options to use with the LogQL query engine.
HeapCountMinSketchVector is a CountMinSketchVector that keeps the number of metrics to a defined maximum.
LiteralParams impls Params.
MapperMetrics is the metrics wrapper used in logql mapping (shard and range).
MatrixStepEvaluator exposes a promql.Matrix as a StepEvaluator.
Shard aware mock querier.
Node is a handle associated with a specific depth in a tree.
ParamsWithExpressionOverride overrides the query expression so that the query string and the expression can differ.
ParamsWithExpressionOverride overrides the shards.
QuantileSketchEvalExpr evaluates a quantile sketch to the actual quantile.
QuantileSketchMatrixStepEvaluator steps through a matrix of quantile sketch vectors, ie t-digest or DDSketch structures per time step.
QuantileSketchVectorStepEvaluator evaluates a quantile sketch into a promql.Vector.
RangeMapper is used to rewrite LogQL sample expressions into multiple downstream sample expressions with a smaller time range that can be executed using the downstream engine.
rateCounter calculates the per-second rate of values extracted from log lines and treat them like a "counter" metric.
rateLogBytes calculates the per-second rate of log bytes.
rateLogs calculates the per-second rate of log lines or values extracted from log lines.
SelectParams specifies parameters passed to data selections.
Shard represents a shard annotation It holds either a power of two shard (legacy) or a bounded shard.
ShardWithChunkRefs is a convenience type for passing around shards with associated chunk refs.
VectorIterator return simple vector like (1).
# Interfaces
Accumulator is an interface for accumulating query results.
Downstreamer is an interface for deferring responsibility for query execution.
EvaluatorFactory is an interface for iterating over data at different nodes in the AST.
Limits allow the engine to fetch limits for a given users.
Params details the parameters associated with a loki request.
Querier allows a LogQL expression to fetch an EntryIterator for a set of matchers and filters.
Query is a LogQL query to be executed.
RangeStreamingAgg streaming aggregates sample for each sample.
RangeVectorIterator iterates through a range of samples.
StepEvaluator evaluate a single step of a query.
# Type aliases
BatchRangeVectorAggregator aggregates samples for a given range of samples.