Commit Graph

196 Commits

Author SHA1 Message Date
Robert Schulze
18cbc7b511
Docs: catboostEvaluate() is unavailable in Cloud 2023-02-16 19:19:25 +00:00
Robert Schulze
da0002c4c4
Document how the library-bridge port can be changed
Fixes #43605
2022-12-02 10:54:54 +00:00
Alejandro
62ab271b82 fix docs 2022-11-03 09:04:22 +01:00
Alejandro
4e3f43650a Added function to docs 2022-11-03 09:04:22 +01:00
alexeyerm
9abfe76fbb
doc fix fix 2022-10-21 20:08:44 +03:00
alexeyerm
95943dbdda
fix transform() example 2022-10-21 19:44:35 +03:00
Robert Schulze
82139fad0e
Docs: Remove obsolete modelEvaluate() mention 2022-09-28 11:47:16 +00:00
Robert Schulze
60f9f6855d
feat: implement catboost in library-bridge
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
2022-09-08 09:01:32 +00:00
Robert Schulze
912663b719
Revert "Move CatBoost evaluation into clickhouse-library-bridge" 2022-08-31 20:54:43 +02:00
Robert Schulze
6b2b3c1eb3
feat: implement catboost in library-bridge
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
2022-08-29 20:26:45 +00:00
DanRoscigno
5b5fcc56aa add slugs 2022-08-28 10:53:34 -04:00
Robert Schulze
f121941916
feat: allow custom error code for SQL function throwIf() 2022-08-17 21:14:40 +00:00
jiahui-97
e7af88b688 implementation of parseTimeDelta function
Co-authored-by: Kruglov Pavel <48961922+Avogar@users.noreply.github.com>
2022-07-19 09:33:02 +08:00
rfraposa
869967de41 Remove H1 anchor tags from docs 2022-06-02 04:55:18 -06:00
rfraposa
d9e6f780db Fixed broken links 2022-04-10 23:01:34 -06:00
rfraposa
8f01fe9c49 Revised /en folder 2022-04-09 07:34:21 -06:00
rfraposa
5250d9ad11 Removed /ja folder, cleaned up /ru markdown 2022-04-09 07:29:05 -06:00
taiyang-li
7889059f7d fix building 2022-03-25 22:39:57 +08:00
李扬
1d8ab36de0
Update other-functions.md 2022-03-23 21:44:14 +08:00
taiyang-li
98a9b81c1d update doc 2022-03-21 14:23:25 +08:00
taiyang-li
93550d547e add doc and tests 2022-03-15 18:25:36 +08:00
Roman Bug
b8248cdc95 Minor fix. 2021-11-09 13:08:47 +03:00
Roman Bug
d8f1ff7727
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: gyuton <40863448+gyuton@users.noreply.github.com>
2021-11-09 13:02:06 +03:00
romanzhukov
206c72ed50 DOCSUP-15137: Add zookeeperSessionUptime docs. 2021-11-08 00:42:57 +03:00
Dmitriy
894353d910 Translate to Russian
Выполнил перевод на русский язык.
2021-10-21 21:33:47 +03:00
Dmitriy
b0752b43ac Add the getOSKernelVersion function
Задокументировал английскую версию функции getOSKernelVersion.
2021-10-20 20:20:14 +03:00
Alexey
7f5852a711 New buildId variant
Links from Distributed
2021-10-09 18:37:28 +00:00
Alexey
f854065744 buildID() description 2021-10-08 05:05:12 +00:00
Alexey
c2533b9743 constant or column note added for other functions 2021-10-06 20:13:46 +00:00
Alexey
4894588f27 description improved
new example
2021-10-06 19:50:05 +00:00
Alexey
2266115c54 Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into alexey-sm-DOCSUP-14057-document-shardNum-shardCount 2021-10-05 19:35:46 +00:00
Alexey Milovidov
e9e77b4403 .tech -> .com 2021-09-22 03:22:57 +03:00
Alexey
6277747e8a First draft 2021-09-20 05:37:18 +00:00
Alexey Milovidov
147ef79670 Change website URL, part 1 2021-09-20 01:56:28 +03:00
Dmitriy
c9db269569 Merge remote-tracking branch 'remotes/clickhouse/master' into sevirov-DOCSUP-13590-document_the_getserverport_function 2021-08-29 19:00:29 +03:00
Dmitriy
b62fb1e8cf
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-25 22:30:14 +03:00
Dmitriy
80b6097dae Fix typo
Убрал лишние отступы.
2021-08-25 20:33:00 +03:00
Dmitriy
7295bf95b3
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: Alexey Boykov <33257111+mathalex@users.noreply.github.com>
2021-08-25 20:16:16 +03:00
Dmitriy
e8e60e1a60
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: Alexey Boykov <33257111+mathalex@users.noreply.github.com>
2021-08-25 20:15:57 +03:00
Dmitriy
f1be822a1a
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: Alexey Boykov <33257111+mathalex@users.noreply.github.com>
2021-08-25 20:14:04 +03:00
Dmitriy
7d9180cd8c Update other-functions.md
Поправил предупреждение.
2021-08-24 20:08:39 +03:00
Dmitriy
dd5e303e29
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-24 19:52:28 +03:00
Dmitriy
41bf324f9c
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-24 19:51:56 +03:00
Dmitriy
77483f14c1
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-24 19:51:29 +03:00
Dmitriy
c491d1a587
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-24 19:51:20 +03:00
Dmitriy
3d9668cf40 Translate to Russian
Перевел на русский язык.
2021-08-23 22:44:01 +03:00
Dmitriy
df94b49179 Translate to Russian
Перевел на русский язык.
2021-08-22 19:02:40 +03:00
Dmitriy
f120f3c8a0 Document the getServerPort function
Задокументировал функцию getServerPort.
2021-08-22 13:38:43 +03:00
Dmitriy
eeec8004e8 Add the example
Добавил примеры.
2021-08-21 23:26:27 +03:00
Dmitriy
7887f3892b Document queryID and initialQueryID functions
Задокументировал две функции.
2021-08-21 13:47:06 +03:00
Vitaly Baranov
d3667b348a
Update other-functions.md 2021-08-09 16:16:31 +03:00
Anna
ef1a73e78e
Update other-functions.md 2021-08-07 18:10:55 +03:00
Anna
1622371af1
Merge branch 'master' into annadevyatova-DOCSUP-12212 2021-08-07 18:07:37 +03:00
Anna
d0e678d72f
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-06 09:54:43 +03:00
Anna
4a0b480294
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-06 08:24:13 +03:00
Anna
83668d1bdd
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-06 08:23:59 +03:00
adevyatova
6ef73ef051 More fixes 2021-08-06 05:15:55 +00:00
adevyatova
d6b5b0922c More fixes 2021-08-06 05:11:13 +00:00
adevyatova
bc1b14af9e Fix conflicts 2021-08-06 04:58:46 +00:00
adevyatova
e7c28767fc Fixes 2021-08-06 04:54:41 +00:00
Anna
71de6f3e03
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-05 09:29:17 +03:00
Anna
1331537064
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-05 09:29:12 +03:00
Anna
ca89cf656d
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-05 09:28:58 +03:00
Anna
4f14ccf3e6
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-05 09:28:52 +03:00
Anna
44b71efb72
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-05 09:27:48 +03:00
Anna
a60640af2f
Update docs/en/sql-reference/functions/other-functions.md
Co-authored-by: olgarev <56617294+olgarev@users.noreply.github.com>
2021-08-05 09:25:52 +03:00
adevyatova
9b9c6e02d1 Applied suggestion from code review 2021-08-04 12:34:50 +00:00
adevyatova
48c14fae6f Applied suggestions from code review 2021-08-04 15:11:42 +03:00
adevyatova
61ddc53e26 Fixed links 2021-08-04 11:51:22 +00:00
adevyatova
5bd665bfba Add ru docs 2021-08-04 11:47:27 +00:00
adevyatova
5c39ae981c Add desc for currentProfiles, enabledProfiles, defaultProfiles func 2021-08-04 11:26:24 +00:00
adevyatova
bb8c6813a1 Update 2021-08-04 10:15:50 +00:00
adevyatova
b613331a25 Add desc for currentRoles, enabledRoles, defaultRoles func 2021-08-04 12:31:24 +03:00
adevyatova
d8c112d0c0 Small current fixes 2021-08-03 12:03:10 +00:00
Anton Popov
68ffbd2ad3 fix docs for function 'initializeAggregation' 2021-06-22 13:14:24 +03:00
Romain Neutron
7b515c7235
Avoid short syntax 2021-05-27 21:44:11 +02:00
Maksim Kita
d31b8486e7
Merge pull request #23557 from adevyatova/annadevyatova-DOCSUP-7928-timezoneOf
DOCSUP-7928: Document the timezoneOf function
2021-04-26 13:40:05 +03:00
adevyatova
35fdeb1da8 add timezone func 2021-04-23 22:27:44 +00:00
Amos Bird
32c84f77c3
Resurrect indexHint function. 2021-04-20 19:27:23 +08:00
lehasm
64539452d9
Merge branch 'master' into alexey-sm-DOCSUP-7099-translate-runningConcurrency 2021-03-16 22:02:11 +03:00
Vladimir
b1f22e893e
Merge branch 'master' into sevirov-DOCSUP-7098-edit_translate_russian_docs_templates 2021-03-15 15:57:54 +03:00
lehasm
0b98737daf Fixed link in runningDifferenceStartingWithFirstValue 2021-03-14 21:03:56 +03:00
lehasm
069f4ab5c4 Fixed link in runningDifferenceStartingWithFirstValue 2021-03-14 21:01:59 +03:00
lehasm
0e2637b22a Warning moved close to function description
Order changed inside warning block
2021-03-14 20:33:12 +03:00
lehasm
08863a0252 Function description placed before syntax.
In in.md created header max_parallel_replica-subqueries with empty text. It is link target from runningConcurrency
2021-03-14 19:27:58 +03:00
Alexey Milovidov
8c9bd09e6c Remove broken "Original article" 2021-03-14 15:19:04 +03:00
Dmitriy
aad98b368e Edit and translate to Russian
Поправил шаблоны в английской и русской версиях.
2021-03-13 21:18:45 +03:00
lehasm
d901d00830 Fixes after review applied 2021-03-10 23:46:29 +03:00
lehasm
c0630e2c90 en text improved. 2021-03-09 22:45:29 +03:00
lehasm
b538b2255b runningConcurrency() english description changed. 2021-03-08 22:44:45 +03:00
Alexander Kuzmenkov
81dc94bca7
Merge pull request #19836 from sevirov/sevirov-DOCSUP-4707-edit_translate_russian_date_time
DOCSUP-4707: Edit and translate to Russian
2021-03-05 05:11:26 +03:00
Dmitriy
187eb837db Add the links
Добавил ссылки.
2021-02-28 20:10:44 +03:00
Vladimir
dc32d1fa41
Make Arguments bold in doc 2021-02-16 14:21:23 +03:00
Anna
ce1f10904e Global replacement Parameters to Arguments 2021-02-16 00:22:10 +03:00
Nikita Mikhaylov
92e13d76d3
Merge pull request #18508 from depressed-pho/runningConcurrency
Add function runningConcurrency()
2021-02-15 14:39:38 +03:00
PHO
09c49d3842 Add function runningConcurrency()
Given a series of beginning time and ending time of events, this function calculates concurrency of the events at each of the data point, that is, the beginning time.
2021-02-03 14:34:44 +09:00
George
1f6a686f4e Some fixes 2021-02-02 05:54:38 +03:00
George
ecab446721 updated and added translation 2021-01-31 21:23:57 +03:00
Dmitriy
649386ff0f Edit and translate to Russian
Поправил английскую версию и перевел на русский язык.
2021-01-29 23:15:42 +03:00
George
e612ad2bab minor fixes 2021-01-28 17:13:41 +03:00