Skip to content

Commit ef1714f

Browse files
charislamLoquacityRajakavitha1
authored
[Caggs] Clarify ORDER BY support (github#1303)
* [Caggs] Clarify ORDER BY support ORDER BY is supported within the ordered-set aggregates, but not in general, which has been confusing for readers. Clarify this, and also remove some repetititon which could be hard to maintain over time. Co-authored-by: Lana Brindley <github@lanabrindley.com> Co-authored-by: Rajakavitha Kodhandapani <krajakavitha@gmail.com>
1 parent 90c2434 commit ef1714f

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed

_partials/_caggs-function-support.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ This table summarizes aggregate function support in continuous aggregates:
99
|`DISTINCT` in aggregate functions|||
1010
|`FILTER` in aggregate functions|||
1111
|`ORDER BY` in aggregate functions|||
12+
13+
<highlight type="note">
14+
Note that `ORDER BY` is supported within the PostgreSQL
15+
[ordered-set aggregates](https://www.postgresql.org/docs/current/functions-aggregate.html).
16+
It is not yet supported in general.
17+
</highlight>

timescaledb/how-to-guides/continuous-aggregates/about-continuous-aggregates.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ and `AVG`, and non-parallelizable aggregates, such as `RANK`.
6666

6767
In older versions of TimescaleDB, continuous aggregates only support
6868
[aggregate functions that can be parallelized by PostgreSQL][postgres-parallel-agg].
69-
They also don't support `FILTER` and `ORDER BY` clauses, and the `DISTINCT` keyword. You can
70-
work around this by aggregating the other parts of your query in the continuous
71-
aggregate, then
69+
You can work around this by aggregating the other parts of your query in the
70+
continuous aggregate, then
7271
[using the window function to query the aggregate][cagg-window-functions].
7372

7473
<CaggsFunctionSupport />

timescaledb/how-to-guides/continuous-aggregates/troubleshooting.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ ERROR: invalid continuous aggregate view
166166
SQL state: 0A000
167167
```
168168

169-
TimescaleDB doesn't support window functions or `JOIN` clauses on continuous
170-
aggregates. In versions earlier than 2.7, it doesn't support any
171-
[non-parallelizable SQL aggregates][postgres-parallel-agg].
172-
173169
<CaggsFunctionSupport />
174170

175171
## Queries using locf() do not return NULL values

timescaledb/overview/core-concepts/continuous-aggregates.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,10 @@ ORDER BY bucket;
8888
```
8989

9090
<highlight type="important">
91-
In TimescaleDB 2.7 and above, continuous aggregates support all PostgreSQL
92-
aggregate functions. They also support aggregates with keywords such as
93-
`DISTINCT`, `ORDER BY`, and `FILTER`. Older versions of TimescaleDB only support
94-
aggregate functions that can be
95-
[parallelized by PostgreSQL](https://www.postgresql.org/docs/current/parallel-plans.html#PARALLEL-AGGREGATION).
96-
They don't support `DISTINCT`, `ORDER BY`, and `FILTER`. For more information,
91+
Continuous aggregates support many PostgreSQL aggregate functions and features.
92+
Support depends on your TimescaleDB version. For a table of supported features,
9793
see the
98-
[how-to guide on continuous aggregates](/timescaledb/latest/how-to-guides/continuous-aggregates/about-continuous-aggregates/#unsupported-functions).
94+
[how-to guide on continuous aggregates](/timescaledb/latest/how-to-guides/continuous-aggregates/about-continuous-aggregates/#supported-functions).
9995
</highlight>
10096

10197
## Real-time aggregation

0 commit comments

Comments
 (0)