From 9dc34b00aad11f723defc63df35cab892de64373 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 25 Jun 2021 11:06:31 -0600 Subject: [PATCH] Flux 0.118 (#2784) * flux 0.118 release notes * updated pagerduty.dedupkey and operator precendence * updated operator precedence table format * updated description of pagerduty.dedupkey exclude param --- .../reference/flux/language/expressions.md | 37 ++++++++++--------- .../v2.0/reference/flux/language/operators.md | 37 ++++++++++--------- .../flux/stdlib/pagerduty/dedupkey.md | 17 ++++++++- .../v2.0/reference/release-notes/flux.md | 17 +++++++++ 4 files changed, 71 insertions(+), 37 deletions(-) diff --git a/content/influxdb/v2.0/reference/flux/language/expressions.md b/content/influxdb/v2.0/reference/flux/language/expressions.md index e16e084d1..77bc2fb2f 100644 --- a/content/influxdb/v2.0/reference/flux/language/expressions.md +++ b/content/influxdb/v2.0/reference/flux/language/expressions.md @@ -241,24 +241,25 @@ Operators combine operands into expressions. The precedence of the operators is given in the table below. Operators with a lower number have higher precedence. -| Precedence | Operator | Description | -|:----------:|:--------: |:-------------------------- | -| 1 | `a()` | Function call | -| | `a[]` | Member or index access | -| | `.` | Member access | -| 2 | \|> | Pipe forward | -| 3 | `^` | Exponentiation | -| 4 | `*` `/` `%` | Multiplication, division, and modulo | -| 5 | `+` `-` | Addition and subtraction | -| 6 |`==` `!=` | Comparison operators | -| | `<` `<=` | | -| | `>` `>=` | | -| |`=~` `!~` | | -| 7 | `not` | Unary logical operator | -| | `exists` | Null check operator | -| 8 | `and` | Logical AND | -| 9 | `or` | Logical OR | -| 10 | `if` `then` `else` | Conditional | +| Precedence | Operator | Description | +| :--------: | :----------------: | :----------------------------------- | +| 1 | `a()` | Function call | +| | `a[]` | Member or index access | +| | `.` | Member access | +| 2 | \|> | Pipe forward | +| 3 | `() => 1` | FunctionLiteral | +| 4 | `^` | Exponentiation | +| 5 | `*` `/` `%` | Multiplication, division, and modulo | +| 6 | `+` `-` | Addition and subtraction | +| 7 | `==` `!=` | Comparison operators | +| | `<` `<=` | | +| | `>` `>=` | | +| | `=~` `!~` | | +| 8 | `not` | Unary logical operator | +| | `exists` | Null check operator | +| 9 | `and` | Logical AND | +| 10 | `or` | Logical OR | +| 11 | `if` `then` `else` | Conditional | The operator precedence is encoded directly into the grammar as the following. diff --git a/content/influxdb/v2.0/reference/flux/language/operators.md b/content/influxdb/v2.0/reference/flux/language/operators.md index 64fef0b33..256a32608 100644 --- a/content/influxdb/v2.0/reference/flux/language/operators.md +++ b/content/influxdb/v2.0/reference/flux/language/operators.md @@ -131,21 +131,22 @@ Literal constructors define fixed values. The table below outlines operator precedence. Operators with a lower number have higher precedence. -| Precedence | Operator | Description | -|:----------:|:--------: |:-------------------------- | -| 1 | `a()` | Function call | -| | `a[]` | Member or index access | -| | `.` | Member access | -| 2 | \|> | Pipe forward | -| 3 | `^` | Exponentiation | -| 4 | `*` `/` `%` | Multiplication, division, and modulo | -| 5 | `+` `-` | Addition and subtraction | -| 6 |`==` `!=` | Comparison operators | -| | `<` `<=` | | -| | `>` `>=` | | -| |`=~` `!~` | | -| 7 | `not` | Unary logical operator | -| | `exists` | Null check operator | -| 8 | `and` | Logical AND | -| 9 | `or` | Logical OR | -| 10 | `if` `then` `else` | Conditional | +| Precedence | Operator | Description | +| :--------: | :----------------: | :----------------------------------- | +| 1 | `a()` | Function call | +| | `a[]` | Member or index access | +| | `.` | Member access | +| 2 | \|> | Pipe forward | +| 3 | `() => 1` | FunctionLiteral | +| 4 | `^` | Exponentiation | +| 5 | `*` `/` `%` | Multiplication, division, and modulo | +| 6 | `+` `-` | Addition and subtraction | +| 7 | `==` `!=` | Comparison operators | +| | `<` `<=` | | +| | `>` `>=` | | +| | `=~` `!~` | | +| 8 | `not` | Unary logical operator | +| | `exists` | Null check operator | +| 9 | `and` | Logical AND | +| 10 | `or` | Logical OR | +| 11 | `if` `then` `else` | Conditional | diff --git a/content/influxdb/v2.0/reference/flux/stdlib/pagerduty/dedupkey.md b/content/influxdb/v2.0/reference/flux/stdlib/pagerduty/dedupkey.md index 0424b534c..efaffb522 100644 --- a/content/influxdb/v2.0/reference/flux/stdlib/pagerduty/dedupkey.md +++ b/content/influxdb/v2.0/reference/flux/stdlib/pagerduty/dedupkey.md @@ -22,9 +22,19 @@ _**Function type:** Transformation_ ```js import "pagerduty" -pagerduty.dedupKey() +pagerduty.dedupKey( + exclude: ["_start", "_stop", "_level"] +) ``` +## Parameters + +### exclude +Group key columns to exclude when generating the deduplication key. +Default is `["_start", "_stop", "_level"]`. + +_**Data type:** Array of strings_ + ## Examples ##### Add a PagerDuty deduplication key to output data @@ -36,3 +46,8 @@ from(bucket: "default") |> filter(fn: (r) => r._measurement == "mem") |> pagerduty.dedupKey() ``` + +{{% expand "View function updates" %}} +#### v1.18.0 +- Add `exclude` parameter to exclude group key columns when generating the deduplication key. +{{% /expand %}} diff --git a/content/influxdb/v2.0/reference/release-notes/flux.md b/content/influxdb/v2.0/reference/release-notes/flux.md index 6eaf7a7f5..5e8ef81e1 100644 --- a/content/influxdb/v2.0/reference/release-notes/flux.md +++ b/content/influxdb/v2.0/reference/release-notes/flux.md @@ -8,6 +8,23 @@ menu: name: Flux --- +## v0.118.1 [2021-06-15] +- _Internal code cleanup._ + +--- + +## v0.118.0 [2021-06-15] + +### Features +- Add `exclude` parameter to `pagerduty.dedupKey()`. + +### Bug fixes +- Ensure PagerDuty tests include a `_value` column. +- Add length check to CSV annotation parsing. +- Change `FunctionLiteral` precedence to preserve parentheses. + +--- + ## v0.117.3 [2021-06-07] - _Internal code cleanup._