Fix order of aggregateWindow
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
075857a83b
commit
e6a004e00c
2 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,6 @@ class QueryBuilder
|
|||
self::FLUX_PART_FROM,
|
||||
self::FLUX_PART_RANGE,
|
||||
self::FLUX_PART_REDUCE,
|
||||
self::FLUX_PART_AGGREGATEWINDOW,
|
||||
self::FLUX_PART_WINDOW,
|
||||
self::FLUX_PART_FILTERS,
|
||||
self::FLUX_PART_MAP,
|
||||
|
|
@ -42,6 +41,7 @@ class QueryBuilder
|
|||
self::FLUX_PART_GROUP,
|
||||
self::FLUX_PART_LIMIT,
|
||||
self::FLUX_PART_UNWINDOW,
|
||||
self::FLUX_PART_AGGREGATEWINDOW,
|
||||
];
|
||||
|
||||
public const REQUIRED_INPUT_FROM = 'from';
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ final class QueryBuilderTest extends TestCase
|
|||
|
||||
$expectedQuery = 'from(bucket: "test_bucket") |> range(start: time(v: 2022-08-12T17:31:00Z)) ' .
|
||||
'|> reduce(fn: (r, accumulator) => ({count: accumulator.count + 1}), identity: {count: 0}) ' .
|
||||
'|> aggregateWindow(every: 20s, fn: mean) |> filter(fn: (r) => r._measurement == "test_measurement") ';
|
||||
'|> filter(fn: (r) => r._measurement == "test_measurement") |> aggregateWindow(every: 20s, fn: mean) ';
|
||||
|
||||
$this->assertEquals($expectedQuery, $queryBuilder->build());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue