influxdata / influxdata/docs-v2
Update 'difference()' description to reflect actual behavior
@kelseiv is already working on this.
Since Jul 30, 2021.
- Dominant language
- JavaScript
- Stars
- 82
- Forks
- 326
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 82
Description
From Slack:
---
The docs on the `difference` function say:
> nonNegative indicates if the difference is allowed to be negative. When set to true, if a value is less than the previous value, it is assumed the previous value should have been a zero.
That sounds like if there's a negative difference, we'll get the original value instead (r["_value"] - 0), but we actually get null (and the examples later in the docs support this behavior).
Just to confirm: the null behavior is intended and the docs are wrong here, right?
---
##### Relevant URLs
- https://docs.influxdata.com/influxdb/v2.0/reference/flux/stdlib/built-in/transformations/difference/
- https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/built-in/transformations/difference/
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.