Commit Graph

2921 Commits

Author SHA1 Message Date
Robert Schulze
b32b02d844
Merge pull request #40897 from ClickHouse/catboost-bridge-resurrected
Move CatBoost evaluation into clickhouse-library-bridge
2022-09-16 13:12:09 +02:00
Roman Vasin
d82cd7b007 Add many cosmetic changes to C++ code and MD docs 2022-09-16 09:37:30 +00:00
Roman Vasin
5c242de43a Merge branch 'master' of github.com:ClickHouse/ClickHouse into ADQM-528-B 2022-09-15 13:47:51 +00:00
Roman Vasin
3ce66eab83 Correct all needed MD files 2022-09-15 13:28:11 +00:00
Kseniia Sumarokova
c511c3f168
Merge pull request #40889 from AVMusorin/docs_table_function_update
Doc. Updated optional parameters for table functions
2022-09-15 13:12:20 +02:00
JackyWoo
afcbf3a853
Merge branch 'master' into add_function_java_int_hash 2022-09-15 10:08:26 +08:00
JackyWoo
05516bfd03 fix docs 2022-09-15 10:07:39 +08:00
Denny Crane
69d90de9a3
Update date-time-functions.md 2022-09-14 15:23:59 -03:00
Denny Crane
cbdbe1077a
Update date-time-functions.md 2022-09-14 12:16:32 -03:00
JackyWoo
9578594439
Merge branch 'master' into add_function_java_int_hash 2022-09-14 20:42:41 +08:00
Robert Schulze
cb04c724b9
Merge pull request #41285 from ClickHouse/fix-broken-doc-links
System statements docs: Fix broken links
2022-09-14 13:03:01 +02:00
JackyWoo
2c8e5f0156 Merge branch 'master' into add_function_java_int_hash 2022-09-14 10:11:15 +08:00
Robert Schulze
49136d26aa
docs: fix internal links
The links at the very beginning of
https://clickhouse.com/docs/en/sql-reference/statements/system
don't work. They are reference other sections of the same document. This
is weird because there is a small index already on the right side. I
searched our documentation and this seems to be the only pages which do
so. Therefore removing the links altogether instead of fixing them.
2022-09-13 19:45:46 +00:00
Dan Roscigno
078b9bff3c
Update docs/en/sql-reference/statements/delete.md 2022-09-13 13:18:01 -04:00
Rich Raposa
b833c39dcf
Update delete.md 2022-09-13 10:55:26 -06:00
Rich Raposa
e85b222136
Update delete.md 2022-09-13 10:54:47 -06:00
DanRoscigno
64bd1ea77a spelling 2022-09-13 12:42:24 -04:00
DanRoscigno
fc2e7159f0 add note about privs 2022-09-13 12:40:16 -04:00
Robert Schulze
3e6821e8d7
fix: repair broken documentation links and update docs 2022-09-13 16:00:53 +00:00
JackyWoo
e3caa6f096 some fixes 2022-09-13 21:21:35 +08:00
Kruglov Pavel
17621b5607
Merge branch 'master' into fix-totals-extremes 2022-09-13 14:36:31 +02:00
Robert Schulze
fac1be9700
chore: restore SYSTEM RELOAD MODEL(S) and moniting view SYSTEM.MODELS
- This commit restores statements "SYSTEM RELOAD MODEL(S)" which provide
  a mechanism to update a model explicitly. It also saves potentially
  unnecessary reloads of a model from disk after it's initial load.

  To keep the complexity low, the semantics of "SYSTEM RELOAD MODEL(S)
  was changed from eager to lazy. This means that both statements
  previously immedately reloaded the specified/all models, whereas now
  the statements only trigger an unload and the first call to
  catboostEvaluate() does the actual load.

- Monitoring view SYSTEM.MODELS is also restored but with some obsolete
  fields removed. The view was not documented in the past and for now it
  remains undocumented. The commit is thus not considered a breach of
  ClickHouse's public interface.
2022-09-12 19:33:02 +00:00
avogar
8ac2fc7b26 Don't outout totals/extremes in all row formats, update docs 2022-09-12 17:21:40 +00:00
Sergei Trifonov
fe88a7991d
Merge branch 'master' into readonly-settings-allow 2022-09-12 16:20:40 +02:00
Rich Raposa
b9e9d776f0
Update delete.md 2022-09-09 15:55:57 -06:00
rfraposa
4af246a2e0 Feedback 2022-09-09 13:59:21 -06:00
Aleksandr
503398ac96
Merge branch 'master' into docs_table_function_update 2022-09-09 20:54:28 +02:00
Rich Raposa
9870957621
Update docs/en/sql-reference/statements/delete.md
Co-authored-by: Ivan Blinkov <github@blinkov.ru>
2022-09-09 12:16:54 -06:00
Rich Raposa
50789126a8
Update docs/en/sql-reference/statements/delete.md
Co-authored-by: Ivan Blinkov <github@blinkov.ru>
2022-09-09 12:15:59 -06:00
Rich Raposa
34c2c4bb52
Merge branch 'master' into lightweight-delete 2022-09-09 12:13:51 -06:00
Nikolay Degterinsky
6dcaa9f14d
Merge pull request #41106 from vincentbernat/fix/docs-sync
docs: mention SYNC modifier for DROP and DETACH statements
2022-09-09 20:12:47 +02:00
Sergei Trifonov
76eb001e78 add test for changeable_in_readonly + fix SQL in docs 2022-09-09 14:01:29 +02:00
rfraposa
18f5b5e5b0 Add docs for lightweight deletes 2022-09-08 16:05:56 -06:00
Denny Crane
132727d212
Doc. Fix links. 2022-09-08 14:37:42 -03:00
Vincent Bernat
fab1b40928 docs: mention SYNC modifier for DROP and DETACH statements 2022-09-08 15:21:59 +02:00
Robert Schulze
c16707ff00
chore: delete obsolete modelEvaluate() function + SYSTEM.MODELS view
- The deleted function modelEvaluate() was superseded by
  catboostEvaluate().

- Also delete the external model repository, as modelEvaluate() was it's
  last user. Additionally remove the system view SYSTEM.MODELS for
  inspecting the repository.

- SYSTEM RELOAD MODELS is also obsolete. HOWEVER, it was retained and
  made a no-op instead of deleted.

  Why?
  The reason is that RBAC in distributed setups works by storing
  privileges (granted and revoked) as plain SQL statements in Keeper.
  Nodes read these statements at startup and parse them. If a privilege
  for SYSTEM RELOAD MODELS exists but parser doesn't recognize it
  nodes would fail to come up.

  Considered but rejected alternatives:
  - Ignore SYSTEM RELOAD MODELS during parsing RBAC privileges and
    return an error for regular SYSTEM RELOAD MODELS SQL. Special-case
    of no-op behavior, too brittle.
  - Remove SYSTEM RELOAD MODELS manually from Keeper via command-line
    manipulation of Keeper nodes or via SQL by dropping the privileges.
    Needs user intervention during upgrade.
2022-09-08 09:10:11 +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
Denny Crane
a75eb5ad84
Update date-time-functions.md 2022-09-07 15:59:23 -03:00
Denny Crane
0071ef9e38
Update date-time-functions.md 2022-09-07 15:56:31 -03:00
Kruglov Pavel
582216a3ca
Merge pull request #39919 from pzhdfy/UniqSketch
UniqThetaSketch support set operation such as union/intersect/not
2022-09-05 13:42:14 +02:00
Alexey Milovidov
deeaea004d
Merge pull request #40295 from cyber-moon/patch-1
Add description of {condition}-keyword
2022-09-04 04:57:30 +03:00
Alexey Milovidov
1963baa11e
Merge pull request #40964 from ClickHouse/fix-docs-formatting
Fix formatting of notes box in documentation
2022-09-04 03:39:39 +03:00
Denny Crane
dd19b0856e
Doc. mapApply, mapFilter, mapUpdate (#40961)
* Update tuple-map-functions.md

* Update tuple-map-functions.md
2022-09-04 00:43:39 +02:00
Robert Schulze
385427ade8
Fix formatting of notes box in documentation
Follow-up to PR #38435
2022-09-03 17:25:14 +00:00
Robert Schulze
53836bbeeb
Fix typo
The system view is called 'role*_*grants', documented on page
'role*-*grants.md'.
2022-09-02 12:49:50 +00:00
Александр
97e55ca2f5
Merge branch 'master' into docs_table_function_update 2022-09-01 14:01:32 +02:00
Fangyuan Deng
bc7d661668
Merge branch 'master' into UniqSketch 2022-09-01 19:31:53 +08:00
Denny Crane
e3af5a7a11
Doc. Added ON CLUSTER cluster in couple places (#40874) 2022-09-01 13:31:22 +02:00
pzhdfy
acec516271 add docs 2022-09-01 19:31:01 +08:00
Aleksandr Musorin
310e1484f6
docs - updated optional parameters for table functions 2022-09-01 13:28:56 +02:00
Robert Schulze
56eece40ec
Merge pull request #40736 from LevyCory/add-offset-to-formatDateTime
Add timezone offset support  to `formatDateTime`
2022-09-01 09:50:17 +02:00
Robert Schulze
912663b719
Revert "Move CatBoost evaluation into clickhouse-library-bridge" 2022-08-31 20:54:43 +02:00
Robert Schulze
ca01286028
Merge pull request #39629 from ClickHouse/catboost-bridge
Move CatBoost evaluation into clickhouse-library-bridge
2022-08-31 16:16:11 +02:00
Robert Schulze
40468d3304
Fix typo in docs 2022-08-30 20:45:31 +00:00
Denny Crane
0d7cc82267
Update string-functions.md 2022-08-30 11:08:23 -03:00
Andrey Zvonov
93f9abf130
upd2 2022-08-30 14:41:40 +03:00
Andrey Zvonov
14adea8792
fix error in docs 2022-08-30 14:40:26 +03:00
Alexey Milovidov
0190c56faf
Merge pull request #40770 from den-crane/patch-40
Doc. Fix cache dictionaries doc.
2022-08-30 02:19:32 +03:00
Cory Levy
1e2eee7146 Remove unnecessary backslashes in markdown sql blocks 2022-08-29 16:31:31 -04:00
Robert Schulze
64a6aa328e
fix: broken links in documentation (hopefully) 2022-08-29 20:27:06 +00: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
Denny Crane
fe0f18f21d
Update external-dicts-dict-layout.md 2022-08-29 15:19:15 -03:00
DanRoscigno
76a3212fc8 replace symlinks 2022-08-29 12:26:17 -04:00
DanRoscigno
c4b8137d31 replace symlinks 2022-08-29 12:19:50 -04:00
Cory Levy
deb2a97020 Add docs 2022-08-28 22:28:34 -04:00
DanRoscigno
b50fa8b5a9 replace symlinks 2022-08-28 17:34:50 -04:00
DanRoscigno
5b5fcc56aa add slugs 2022-08-28 10:53:34 -04:00
DanRoscigno
db1a3b717c add slugs 2022-08-28 09:58:27 -04:00
DanRoscigno
c4caa35cfd add frontmatter dashes 2022-08-28 09:53:52 -04:00
Robert Schulze
df934d8762
Merge pull request #40217 from zvonand/zvonand-minmax
Fix conversion Date32 / DateTime64 / Date to narrow types
2022-08-28 09:42:39 +02:00
Dan Roscigno
c9dea66f8d
Merge pull request #38308 from DanRoscigno/38284-add-grouping-function-docs
38284 add grouping function docs
2022-08-25 16:03:31 -04:00
DanRoscigno
5847c5cdbd reducing samples 2022-08-25 15:46:48 -04:00
Alexey Milovidov
64b8b8294d
Update grouping_function.md 2022-08-25 22:01:13 +03:00
zvonand
6ad02fd687 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-minmax 2022-08-24 01:12:38 +03:00
zvonand
e257f9d0cd update docs, tests + small fixes 2022-08-24 01:09:14 +03:00
zvonand
a9fd733871 updated docs 2022-08-24 01:09:14 +03:00
Andrey Zvonov
f40bd2194f
Update docs/en/sql-reference/functions/date-time-functions.md
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2022-08-23 23:42:19 +03:00
Andrey Zvonov
b54a04d48f
Update docs/en/sql-reference/functions/date-time-functions.md
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2022-08-23 23:42:01 +03:00
Andrey Zvonov
6c1fa6844f
Update docs/en/sql-reference/functions/date-time-functions.md
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2022-08-23 23:41:19 +03:00
Andrey Zvonov
946223df20
Update docs/en/sql-reference/functions/date-time-functions.md
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2022-08-23 23:41:01 +03:00
Andrey Zvonov
e4f00e2f15
Update docs 1
Co-authored-by: Robert Schulze <robert@clickhouse.com>
2022-08-23 23:40:34 +03:00
Denny Crane
add65a17e7
Update index.md 2022-08-23 15:02:44 -03:00
Denny Crane
a790725bea
Update index.md 2022-08-23 14:35:33 -03:00
Denny Crane
f93bb53c1f
Update index.md 2022-08-23 14:32:56 -03:00
zvonand
d789dabc9d Fixed , updated docs 2022-08-22 17:36:56 +03:00
zvonand
963d838647 updated docs 2022-08-22 17:36:56 +03:00
Denny Crane
b6329293a9
Update date-time-functions.md 2022-08-21 16:45:13 -03:00
Denny Crane
c926d04c21
Update date-time-functions.md 2022-08-21 16:42:40 -03:00
Alexey Milovidov
34a07a5db0
Update datetime64.md 2022-08-21 17:22:40 +03:00
Denny Crane
54374e22e6
Update date-time-functions.md 2022-08-19 15:09:40 -03:00
Robert Schulze
24615059fb
Merge pull request #40319 from ClickHouse/custom-error-code-in-throwif
Allow custom error code in throwIf
2022-08-19 09:49:35 +02:00
Robert Schulze
f121941916
feat: allow custom error code for SQL function throwIf() 2022-08-17 21:14:40 +00:00
Stephan
5252d41fdb
Provide missing documentation for arrayWithConstant
Documentation of `arrayWithConstant(l, const)`-function, as this was not part of the documentation so far.
2022-08-17 13:21:03 +02:00
Stephan
9242c2adb4
Add description of {condition}-keyword
Using the {condition}-keyword for Dictionaries is supported since a few weeks (see https://github.com/ClickHouse/ClickHouse/issues/33746 ). This PR adds a corresponding documentation.
2022-08-17 11:56:48 +02:00
Denny Crane
f574b49825
Update array-join.md 2022-08-15 16:45:07 -03:00
Denny Crane
f3b349fd18
Update array-join.md 2022-08-15 16:42:55 -03:00
Denny Crane
73f51a0f19 doc array-join 2022-08-15 16:40:48 -03:00
DanRoscigno
d47fa94ded promote to H1 to fix case in title 2022-08-15 13:22:10 -04:00
DanRoscigno
71409f8f67 trying tags with Algolia 2022-08-15 11:08:46 -04:00
DanRoscigno
ced68e9298 add title frontmatter 2022-08-15 09:27:20 -04:00