Change optional parameters of window() into an array

Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
davidarendsen 2022-09-01 12:50:08 +00:00
commit 156d771b24
3 changed files with 24 additions and 68 deletions

View file

@ -20,7 +20,15 @@ final class WindowFunctionTest extends TestCase
public function testAllParameters()
{
$expression = new Window('20s', 'every', '0s', 'location', '_time', '_start', '_stop', true);
$expression = new Window('20s', [
'period' => 'every',
'offset' => '0s',
'location' => 'location',
'timeColumn' => '_time',
'startColumn' => '_start',
'stopColumn' => '_stop',
'createEmpty' => true
]);
$query = '|> window(every: 20s, period: every, offset: 0s, location: "location", ' .
'timeColumn: "_time", startColumn: "_start", stopColumn: "_stop", createEmpty: true) ';