table.go
table.go - Overview
-
Overview This file contains the function
PrepareMetricQueryDeltaTable
, which constructs a query for fetching metrics, incorporating time and space aggregation based on the provided parameters. -
Detailed Documentation
Function: PrepareMetricQueryDeltaTable
- Purpose: This function constructs a query to fetch metrics, applying time and space aggregations. It determines whether to use an optimized query path based on the input
mq
and prepares the query accordingly. - Parameters:
start
(int64): The start timestamp for the query.end
(int64): The end timestamp for the query.step
(int64): The step interval for the query.mq
(*v3.BuilderQuery): A pointer to the query builder object, containing details about the query, such as group by, order by, space aggregation, and filters.
- Returns:
- (string): The constructed SQL query string.
- (error): An error object, if any error occurred during query preparation.
Function: canShortCircuit
- Purpose: Purpose unclear from the code.
- Parameters:
mq
(*v3.BuilderQuery): A pointer to the query builder object.
- Returns:
- (bool): Purpose unclear from the code.
Function: prepareQueryOptimized
- Purpose: Purpose unclear from the code.
- Parameters:
start
(int64): The start timestamp for the query.end
(int64): The end timestamp for the query.step
(int64): The step interval for the query.mq
(*v3.BuilderQuery): A pointer to the query builder object.
- Returns:
- (string): Purpose unclear from the code.
- (error): Purpose unclear from the code.
Function: prepareTimeAggregationSubQuery
- Purpose: Purpose unclear from the code.
- Parameters:
start
(int64): The start timestamp for the query.end
(int64): The end timestamp for the query.step
(int64): The step interval for the query.mq
(*v3.BuilderQuery): A pointer to the query builder object.
- Returns:
- (string): Purpose unclear from the code.
- (error): Purpose unclear from the code.
- Code Examples
None.
Include in Getting Started: NO