Skip to content

Commit 99c9512

Browse files
add influxql integral function (#6236)
Co-authored-by: Jason Stirnaman <[email protected]>
1 parent cf8cd90 commit 99c9512

File tree

2 files changed

+14
-28
lines changed

2 files changed

+14
-28
lines changed

content/shared/influxql-v3-reference/feature-support.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,41 +65,37 @@ The following table provides information about what metaqueries are available in
6565

6666
### Aggregate functions
6767

68-
| Function | Supported |
69-
| :---------------------------------------------------------------------------------------- | :----------------------: |
68+
| Function | Supported |
69+
| :-------------------------------------------------------------------------------- | :----------------------: |
7070
| [COUNT()](/influxdb/version/reference/influxql/functions/aggregates/#count) | **{{< icon "check" >}}** |
7171
| [DISTINCT()](/influxdb/version/reference/influxql/functions/aggregates/#distinct) | **{{< icon "check" >}}** |
72-
| <span style="opacity: .5;">INTEGRAL()</span> | |
72+
| [INTEGRAL()](/influxdb/version/reference/influxql/functions/aggregates/#integral) | **{{< icon "check" >}}** |
7373
| [MEAN()](/influxdb/version/reference/influxql/functions/aggregates/#mean) | **{{< icon "check" >}}** |
7474
| [MEDIAN()](/influxdb/version/reference/influxql/functions/aggregates/#median) | **{{< icon "check" >}}** |
7575
| [MODE()](/influxdb/version/reference/influxql/functions/aggregates/#mode) | **{{< icon "check" >}}** |
7676
| [SPREAD()](/influxdb/version/reference/influxql/functions/aggregates/#spread) | **{{< icon "check" >}}** |
7777
| [STDDEV()](/influxdb/version/reference/influxql/functions/aggregates/#stddev) | **{{< icon "check" >}}** |
7878
| [SUM()](/influxdb/version/reference/influxql/functions/aggregates/#sum) | **{{< icon "check" >}}** |
7979

80-
<!--
81-
INTEGRAL [influxdb_iox#6937](https://github.com/influxdata/influxdb_iox/issues/6937)
82-
-->
83-
8480
### Selector functions
8581

86-
| Function | Supported |
87-
| :------------------------------------------------------------------------------------------- | :----------------------: |
82+
| Function | Supported |
83+
| :----------------------------------------------------------------------------------- | :----------------------: |
8884
| [BOTTOM()](/influxdb/version/reference/influxql/functions/selectors/#bottom) | **{{< icon "check" >}}** |
8985
| [FIRST()](/influxdb/version/reference/influxql/functions/selectors/#first) | **{{< icon "check" >}}** |
9086
| [LAST()](/influxdb/version/reference/influxql/functions/selectors/#last) | **{{< icon "check" >}}** |
9187
| [MAX()](/influxdb/version/reference/influxql/functions/selectors/#max) | **{{< icon "check" >}}** |
9288
| [MIN()](/influxdb/version/reference/influxql/functions/selectors/#min) | **{{< icon "check" >}}** |
9389
| [PERCENTILE()](/influxdb/version/reference/influxql/functions/selectors/#percentile) | **{{< icon "check" >}}** |
94-
| <span style="opacity: .5;">SAMPLE()</span> | |
90+
| <span style="opacity: .5;">SAMPLE()</span> | |
9591
| [TOP()](/influxdb/version/reference/influxql/functions/selectors/#top) | **{{< icon "check" >}}** |
9692

9793
<!-- SAMPLE() [influxdb_iox#6935](https://github.com/influxdata/influxdb_iox/issues/6935) -->
9894

9995
### Transformations
10096

101-
| Function | Supported |
102-
| :--------------------------------------------------------------------------------------------------------------------------- | :----------------------: |
97+
| Function | Supported |
98+
| :------------------------------------------------------------------------------------------------------------------- | :----------------------: |
10399
| [ABS()](/influxdb/version/reference/influxql/functions/transformations/#abs) | **{{< icon "check" >}}** |
104100
| [ACOS()](/influxdb/version/reference/influxql/functions/transformations/#acos) | **{{< icon "check" >}}** |
105101
| [ASIN()](/influxdb/version/reference/influxql/functions/transformations/#asin) | **{{< icon "check" >}}** |

content/shared/influxql-v3-reference/functions/aggregates.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,14 @@ _Examples use the sample data set provided in the
66

77
- [COUNT()](#count)
88
- [DISTINCT()](#distinct)
9+
- [INTEGRAL()](#integral)
910
- [MEAN()](#mean)
1011
- [MEDIAN()](#median)
1112
- [MODE()](#mode)
1213
- [SPREAD()](#spread)
1314
- [STDDEV()](#stddev)
1415
- [SUM()](#sum)
1516

16-
<!-- When implemented, place back in alphabetical order -->
17-
<!-- - [INTEGRAL()](#integral) -->
18-
19-
> [!Important]
20-
> #### Missing InfluxQL functions
21-
>
22-
> Some InfluxQL functions are in the process of being rearchitected to work with
23-
> the InfluxDB 3 storage engine. If a function you need is not here, check the
24-
> [InfluxQL feature support page](/influxdb/version/reference/influxql/feature-support/#function-support)
25-
> for more information.
26-
2717
## COUNT()
2818

2919
Returns the number of non-null [field values](/influxdb/version/reference/glossary/#field-value).
@@ -186,14 +176,14 @@ name: home
186176
{{% /expand %}}
187177
{{< /expand-wrapper >}}
188178

189-
<!-- ## INTEGRAL()
179+
## INTEGRAL()
190180

191181
Returns the area under the curve for queried [field values](/influxdb/version/reference/glossary/#field-value)
192182
and converts those results into the summed area per **unit** of time.
193183

194-
> [!Note]
195-
> `INTEGRAL()` does not support [`fill()`](/influxdb/version/query-data/influxql/explore-data/group-by/> #group-by-time-intervals-and-fill).
196-
> `INTEGRAL()` supports int64 and float64 field value [data types](/influxdb/version/reference/glossary/#data-type).
184+
> [!Important]
185+
> - `INTEGRAL()` does not support [`fill()`](/influxdb/version/reference/influxql/group-by/#group-by-time-and-fill-gaps).
186+
> - `INTEGRAL()` supports int64 and float64 field value [data types](/influxdb/version/reference/glossary/#data-type).
197187
198188
```sql
199189
INTEGRAL(field_expression[, unit])
@@ -318,7 +308,7 @@ name: home
318308
{{% /influxdb/custom-timestamps %}}
319309

320310
{{% /expand %}}
321-
{{< /expand-wrapper >}} -->
311+
{{< /expand-wrapper >}}
322312

323313
## MEAN()
324314

0 commit comments

Comments
 (0)