-
Notifications
You must be signed in to change notification settings - Fork 384
Description
Currently we generate documentation from system tables using a ClickHouse binary which is downloaded using the quick-install script. However, it seems that some functions are platform dependent:
<!----- On Ubuntu ----->
ubuntu@ip-10-2-1-100:~$ mkdir test
ubuntu@ip-10-2-1-100:~$ cd test
ubuntu@ip-10-2-1-100:~/test$ curl https://clickhouse.com/ | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --100 2911 0 2911 0 0 29924 0 --:--:-- --:--:-- --:--:-- 30010
Will download https://builds.clickhouse.com/master/amd64/clickhouse into clickhouse
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- -- 0 0 0 0 0 0 0 0 --:--:-- -- 1 147M 1 2397k 0 0 2209k 0 0:01:08 0 19 147M 19 29.3M 0 0 13.8M 0 0:00:10 0 39 147M 39 57.6M 0 0 18.6M 0 0:00:07 0 62 147M 62 92.4M 0 0 22.6M 0 0:00:06 0100 147M 100 147M 0 0 29.0M 0 0:00:05 0:00:05 --:--:-- 30.2M
Successfully downloaded the ClickHouse binary, you can run it as:
./clickhouse
You can also install it:
sudo ./clickhouse install
ubuntu@ip-10-2-1-100:~/test$ ./clickhouse
Decompressing the binary......
ClickHouse local version 25.9.1.2048 (official build).
:) SELECT name FROM system.functions WHERE categories LIKE 'Introspection'
SELECT name
FROM system.functions
WHERE categories LIKE 'Introspection'
Query id: ab48bb69-46b8-40a3-89a2-0f3ae99f860b
→ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
↘ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
┌─name─────────────────────┐
1. │ mergeTreePartInfo │
2. │ addressToLineWithInlines │
3. │ addressToSymbol │
4. │ isMergeTreePartCoveredBy │
5. │ addressToLine │
6. │ tid │
7. │ demangle │
8. │ logTrace │
└──────────────────────────┘
8 rows in set. Elapsed: 0.008 sec.
<!----- On MacOS ----->
/Users/sstruw/Desktop $ mkdir test
/Users/sstruw/Desktop $ cd test
/Users/sstruw/Desktop/test $ curl https://clickhouse.com/ | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- -- 0 0 0 0 0 0 0 0 --:--:-- -- 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0100 2911 0 2911 0 0 123 0 --:--:-- 0:00:23 --:--:-- 730
Will download https://builds.clickhouse.com/master/macos-aarch64/clickhouse into clickhouse
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- -- 0 0 0 0 0 0 0 0 --:--:-- -- 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0 0 106M 0 128k 0 0 7266 0 4:16:11 0 15 106M 15 16.0M 0 0 858k 0 0:02:07 0 30 106M 30 32.7M 0 0 1667k 0 0:01:05 0 46 106M 46 49.3M 0 0 2396k 0 0:00:45 0 63 106M 63 67.2M 0 0 3108k 0 0:00:35 0 78 106M 78 84.0M 0 0 3725k 0 0:00:29 0 90 106M 90 96.0M 0 0 4078k 0 0:00:26 0100 106M 100 106M 0 0 4381k 0 0:00:24 0:00:24 --:--:-- 15.4M
Successfully downloaded the ClickHouse binary, you can run it as:
./clickhouse
You can also install it:
sudo ./clickhouse install
/Users/sstruw/Desktop/test $ ./clickhouse
.....
ClickHouse local version 25.9.1.2048 (official build).
:) SELECT name FROM system.functions WHERE categories LIKE 'Introspection'
SELECT name
FROM system.functions
WHERE categories LIKE 'Introspection'
Query id: 976d9b92-e25e-4ab0-9f6c-f1bb9f40df6c
→ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
↘ Progress: 0.00 rows, 0.00 B (0.00 rows/s., 0.00 B/s.)
┌─name─────────────────────┐
1. │ mergeTreePartInfo │
2. │ isMergeTreePartCoveredBy │
3. │ tid │
4. │ demangle │
5. │ logTrace │
└──────────────────────────┘
5 rows in set. Elapsed: 0.003 sec.
:)
To eliminate this platform dependence we should generate the documentation from a single source in the case of docs Vercel builds and when building locally. (We should still retain the ability to build from a provided ClickHouse binary in the case of docs check on master repo.)
Something that would work better is if we can query an endpoint somewhere running ClickHouse @latest to get the documentation from system tables. I think we will want to do this in future from a ClickHouse Cloud instance as well so that we can display which functions are available in Cloud currently and which aren't, so the change would be useful.