Click or drag to resize
Grid Solutions Framework

BottomTIsSliceSeriesEquivalent Property

Gets or sets a flag indicating whether the function behaves equivalently when processed as a series or as a slice. Value defaults to true for functions that return a series of values, i.e., the return type is Series, and the AllowedGroupOperations includes the flag for Slice operations; otherwise, value defaults to false when the return type is a scalar value, i.e., Scalar, or the AllowedGroupOperations does not include the flag for Slice operations.

Namespace: GrafanaAdapters.Functions.BuiltIn
Assembly: GrafanaAdapters (in GrafanaAdapters.dll) Version: 2.4.207-beta
Syntax
public override bool IsSliceSeriesEquivalent { get; }
View Source

Property Value

Boolean

Implements

IGrafanaFunctionIsSliceSeriesEquivalent
Remarks

When set to true, property indicates that the function, when dealing with time series data, produces the same result matrix whether processed horizontally (series-by-series) or vertically (slice-by-slice). This is typically applicable to functions that return a series of values and are designed to operate across time-aligned data series.

Setting this property to true enables certain optimizations. For instance, the system can bypass slice-mode processing and use standard series processing instead, as both approaches yield equivalent results. This can lead to performance improvements, especially in data-intensive scenarios.

It is important for users defining custom functions to accurately set this property. If the function's output does not depend on the specific mode of time series processing (series vs. slice), set this property to true. Conversely, if the function yields different results when processed by slice-by-slice as compared to when processed series-by-series, or it is a scalar function, this property should be set to false.

Incorrectly setting this property may lead to unexpected behavior or suboptimal performance, as the system relies on this flag to determine the most efficient processing approach.

Internally this function descriptor provides a hint to the Grafana data source adapter on how to handle series results for a function. For functions that return a scalar value this property is ignored, but is automatically set to false to preserve meaning. For slice operations on functions that return a series of values and produce the same result matrix whether processed horizontally or vertically, the slice operation is equivalent to its non-slice operation using the IntervalT function over the same expression, for example, the following queries are equivalent:

  • SliceShift(0.02, 1, FILTER TOP 10 ActiveMeasurements WHERE SignalType='FREQ') -- and --
    Shift(1, Interval(0.02, FILTER TOP 10 ActiveMeasurements WHERE SignalType='FREQ'))
  • SliceRound(0.0333, 3, ACME-STAR:FREQ; ACME-PLUS:FREQ) -- and --
    Round(3, Interval(0.0333, ACME-STAR:FREQ; ACME-PLUS:FREQ))
As a result, slice operations that return a series of values and produce the same result matrix whether processed horizontally or vertically, i.e., is slice-series equivalent, are automatically are replaced with the equivalent non-slice operation and an IntervalT function as an operational optimization.

See Also