Merge pull request #1130 from influxdata/flux/group-warn

Add warning to 'group()' about sort order
pull/1131/head
Scott Anderson 2020-06-22 14:10:34 -06:00 committed by GitHub
commit cb0309e738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -32,6 +32,19 @@ group(columns: ["_time"], mode:"except")
group() group()
``` ```
{{% warn %}}
#### Group does not guarantee sort order
`group()` does not guarantee the sort order of output records.
To ensure data is sorted correctly, use [`sort()`](/v2.0/reference/flux/stdlib/built-in/transformations/sort/)
after `group()`.
```js
data
|> group()
|> sort(columns: ["_time"])
```
{{% /warn %}}
## Parameters ## Parameters
### columns ### columns