Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix doctests #829

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/gauge_agg.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@ INSERT INTO gauge_test SELECT 3, '2020-01-03 UTC'::timestamptz + make_interval(d

### delta

```SQL
```SQL,ignore
SELECT toolkit_experimental.delta(toolkit_experimental.gauge_agg(ts, val)) FROM gauge_test;
```
```output
```ignore
delta
-------
-1991
```

### idelta_left

```SQL
```SQL,ignore
SELECT toolkit_experimental.idelta_left(toolkit_experimental.gauge_agg(ts, val)) FROM gauge_test;
```
```output
```ignore
idelta_left
-------------
1002
```

### idelta_right

```SQL
```SQL,ignore
SELECT toolkit_experimental.idelta_right(toolkit_experimental.gauge_agg(ts, val)) FROM gauge_test;
```
```output
```ignore
idelta_right
--------------
1010
Expand Down
8 changes: 4 additions & 4 deletions docs/tdigest.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ CALL refresh_continuous_aggregate('weekly_sketch', NULL, NULL);
</div>

Finally, a query is run over the aggregate to see various approximate percentiles from different weeks.
```SQL
```SQL,ignore
SELECT
week,
approx_percentile(0.01, digest) AS low,
Expand All @@ -146,7 +146,7 @@ SELECT
FROM weekly_sketch
ORDER BY week;
```
```output
```ignore
week | low | mid | high
-----------------------+-------------------+--------------------+--------------------
2019-12-30 00:00:00+00 | 783.2075197029583 | 1030.4505832620227 | 1276.7865808567146
Expand All @@ -158,14 +158,14 @@ ORDER BY week;
```

It is also possible to combine the weekly aggregates to run queries on the entire data:
```SQL
```SQL,ignore
SELECT
approx_percentile(0.01, combined.digest) AS low,
approx_percentile(0.5, combined.digest) AS mid,
approx_percentile(0.99, combined.digest) AS high
FROM (SELECT rollup(digest) AS digest FROM weekly_sketch) AS combined;
```
```output
```ignore
low | mid | high
------------------+--------------------+--------------------
746.7844638729881 | 1026.6100299252928 | 1294.5391132795592
Expand Down
6 changes: 5 additions & 1 deletion extension/src/stabilization_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ mod tests {
return None;
}

if stable_types.contains(ty) {
// PG17 started automatically creating an array type for types, so we need
// to take those into account.
let ty_no_array = ty.replace("[]", "");

if stable_types.contains(ty) || stable_types.contains(&ty_no_array) {
return None;
}

Expand Down
3 changes: 2 additions & 1 deletion tools/sql-doctester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ edition = "2021"
bytecount = "0.6.2"
clap = { version = "3.2.15", features = ["wrap_help"] }
colored = "2.0.0"
postgres = "0.19.1"
postgres = "=0.19.7" # pinned because we pin tokio-postgres
pulldown-cmark = "0.8.0"
rayon = "1.5"
tokio-postgres = "=0.7.10" # pinned because 0.7.11 added `SimpleQueryMessage::RowDescription`
uuid = { version = "0.8", features = ["v4"] }
walkdir = "2"
Loading