This repository has been archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Under certain circumstances, pushdown queries using promscale-extension aggregates fail. The failure comes from the fact that the start and end parameters passed to the aggregate don't correctly align with the actual data which is aggregated over by the query. A call to the prom_rate aggregate looks something like the following: SELECT prom_rate(start, end, step_size, range, sample_time, sample_value) FROM a_metric WHERE a_metric.t >= data_start AND a_metric.t <= data_end If the time span [data_start, data_end] delivers results which are outside of the time span [start, end], the aggregate function errors. In general, this bug appeared when an aggregate pushdown function (such as PromQL rate) is used together with a vector selector, such that the lookback of the vector selector is larger than that of the aggregate pushdown. The fix is to build the SQL query using the correct values for data_start and data_end.
- Loading branch information
1 parent
990deb5
commit 6b5cc12
Showing
3 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters