Skip to content

Commit

Permalink
remove 'toolkit' prefix (github#525)
Browse files Browse the repository at this point in the history
* remove 'toolkit' prefix

* remove 'toolkit' prefix
  • Loading branch information
Loquacity authored Oct 19, 2021
1 parent f281a55 commit 4368d1d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion api/distinct_count.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This example retrieves the distinct values from a hyperloglog
called `hyperloglog`:

``` sql
SELECT toolkit.distinct_count(toolkit.hyperloglog(64, data))
SELECT distinct_count(hyperloglog(64, data))
FROM generate_series(1, 100) data

distinct_count
Expand Down
4 changes: 2 additions & 2 deletions api/hyperloglog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ called `weights` that holds DOUBLE PRECISION values. This command returns a
digest over that column:

``` sql
SELECT toolkit.hyperloglog(64, weights) FROM samples;
SELECT hyperloglog(64, weights) FROM samples;
```

Alternatively, you can build a view from the aggregate that you can pass to
other `tdigest` functions:

``` sql
CREATE VIEW digest AS SELECT toolkit.hyperloglog(64, data) FROM samples;
CREATE VIEW digest AS SELECT hyperloglog(64, data) FROM samples;
```


Expand Down
6 changes: 3 additions & 3 deletions api/rollup-hyperloglog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ For more information about approximate count distinct functions, see the
## Sample usage

```SQL
SELECT toolkit.distinct_count(toolkit.rollup(logs))
SELECT distinct_count(rollup(logs))
FROM (
(SELECT toolkit.hyperloglog(32, v::text) logs FROM generate_series(1, 100) v)
(SELECT hyperloglog(32, v::text) logs FROM generate_series(1, 100) v)
UNION ALL
(SELECT toolkit.hyperloglog(32, v::text) FROM generate_series(50, 150) v)
(SELECT hyperloglog(32, v::text) FROM generate_series(50, 150) v)
) hll;
count
-------
Expand Down
2 changes: 1 addition & 1 deletion api/stderror.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For more information about approximate count distinct functions, see the
This examples retrieves the standard error from a hyperloglog called `hyperloglog`:

``` sql
SELECT toolkit.stderror(toolkit.hyperloglog(64, data))
SELECT stderror(hyperloglog(64, data))
FROM generate_series(1, 100) data

stderror
Expand Down
18 changes: 9 additions & 9 deletions timescaledb/how-to-guides/hyperfunctions/counter-aggs.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ CREATE TABLE example (
counter increased by a larger or smaller amount:
```sql
SELECT measure_id,
toolkit.delta(
toolkit.counter_agg(ts, val)
delta(
counter_agg(ts, val)
)
FROM example
GROUP BY measure_id;
Expand All @@ -51,8 +51,8 @@ GROUP BY measure_id;
```sql
SELECT measure_id,
time_bucket('15 min'::interval, ts) as bucket,
toolkit.delta(
toolkit.counter_agg(ts, val)
delta(
counter_agg(ts, val)
)
FROM example
GROUP BY measure_id, time_bucket('15 min'::interval, ts);
Expand Down Expand Up @@ -87,11 +87,11 @@ going on in each part.
with t as (
SELECT measure_id,
time_bucket('15 min'::interval, ts) as bucket,
toolkit.counter_agg(ts, val, bounds => toolkit.time_bucket_range('15 min'::interval, ts))
counter_agg(ts, val, bounds => time_bucket_range('15 min'::interval, ts))
FROM example
GROUP BY measure_id, time_bucket('15 min'::interval, ts))
SELECT time_bucket,
toolkit.extrapolated_delta(counter_agg, method => 'prometheus')
extrapolated_delta(counter_agg, method => 'prometheus')
FROM t ;
```

Expand Down Expand Up @@ -121,7 +121,7 @@ out of it.
WITH (timescaledb.continuous)
AS SELECT measure_id,
time_bucket('15 min'::interval, ts) as bucket,
toolkit.counter_agg(ts, val, bounds => time_bucket_range('15 min'::interval, ts))
counter_agg(ts, val, bounds => time_bucket_range('15 min'::interval, ts))
FROM example
GROUP BY measure_id, time_bucket('15 min'::interval, ts);
```
Expand All @@ -131,8 +131,8 @@ out of it.
SELECT
measure_id,
time_bucket('1 day'::interval, bucket),
toolkit.delta(
toolkit.rollup(counter_agg)
delta(
rollup(counter_agg)
)
FROM example_15
GROUP BY measure_id, time_bucket('1 day'::interval, bucket);
Expand Down

0 comments on commit 4368d1d

Please sign in to comment.