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
pull/2785/head
Scott Anderson 2021-06-25 11:06:31 -06:00 committed by GitHub
parent 4e9a160a4f
commit 9dc34b00aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 71 additions and 37 deletions

View File

@ -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 | <code>\|></code> | 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 | <code>\|></code> | 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.

View File

@ -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 | <code>\|></code> | 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 | <code>\|></code> | 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 |

View File

@ -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 %}}

View File

@ -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._