Extend system.functions with in-source documentation#49222
Extend system.functions with in-source documentation#49222rschu1ze merged 10 commits intoClickHouse:masterfrom DanRoscigno:add-examples-to-functions
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
This is great Robert, I had started to make a list of things to cover (syntax, etc.) and you have all of the ones I thought of plus more. Thanks so much. What is the NOLINT for on line 73? |
|
The new fields are the obvious ones I found in the existing docs. Perhaps there are more and it should not be too difficult to add them. NOLINT is just to suppress a linter warning about a missing Interestingly, FastTest still fails, I remember that it was green in my local environment. Let me check again. |
|
I like idea of #36023 issue for arguments (or signature) of functions. Ie it will look like: |
Thanks @UnamedRus Would arguments and syntax provide the functionality that you asked for @sarah-mdv |
|
A few thoughts:
|
|
I have one more column to suggest, but I have to think about what it should be named. Let me start with the problem statement: Our settings documentation has settings that should be set in /etc/clickhouse/server/config.d/filename.xml, some that should be in a specific section of ...users.d/filename.xml, some that should be set on a session basis, and some that should be set in a user's profile in Cloud. (are there more options? I don't think so). I think that we need a list of places/methods for configuring these settings. Example, if you configure max_concurrent_connections_for_all_users in config.d, ClickHouse will not start. Maybe the column is |
|
@DanRoscigno Completely agree. Note that docs for settings docs follow a different "template" than function docs. E.g. only the former has "default value" and "possible values" fields. Also, settings docs are exposed in a different system table (this one). I think we should build (in a separate PR) a second C++ |
Agreed, I will work on that this morning. Thanks again! |

End Goal:
Problem:
There are examples embedded in the source, but they are not being copied to the system tables
when the
descriptioninformation is copied over. This PR adds the embedded examples andwill be extended to add the rest of the available information.
Step 2 will be to increase the amount of embedded documentation by copying from the markdown
files into the source (so that the source is the source of truth for the docs)
Step 3 will be to automate the generation of the docs in CI
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Copies embedded examples to a new field
exampleinsystem.functionsto supplement the fielddescription