having.go
having.go - Overview
This file implements the logic for applying HAVING
clauses to query results. The HAVING
clause filters aggregated data based on specified conditions.
Detailed Documentation
ApplyHavingClause
Purpose:
Applies the HAVING
clause to filter the points in each series of the query results based on the specified conditions.
Parameters:
result
([]*v3.Result): The slice of query results to process.queryRangeParams
(*v3.QueryRangeParamsV3): The query range parameters, including the composite query and builder queries containing theHAVING
clause.
Returns:
None. The function modifies the result
slice in place, filtering points and series as necessary.
evaluateHavingClause
Purpose:
Evaluates a single HAVING
clause condition against a given value.
Parameters:
having
([]v3.Having): The slice ofHAVING
conditions to evaluate.value
(float64): The value to test against theHAVING
condition.
Returns:
bool
:true
if the value satisfies the condition,false
otherwise.
Include in Getting Started: NO