Extend `system.documentation` with a `source` column holding the path of the
source file where each entity's documentation is defined, relative to the
repository root. The path is captured automatically at the construction site of
every `Documentation`/`FunctionDocumentation` object via `std::source_location`
(and normalized to be repository-relative regardless of build path mapping), and
is provided explicitly for the entity groups documented in a single source file.
Also document additional kinds of entities: compression codecs (`Compression
Codec`), profile events (`Profile Event`), current metrics (`Current Metric`),
asynchronous metrics (`Asynchronous Metric`), and the system tables themselves
(`System Table`). For system tables the documentation is the table comment
together with the list of its columns (name, type and description); for settings
of any kind the documentation now also includes the type and default value.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Swap std::vector, std::map, std::set, std::unordered_map, std::list to the
corresponding *WithMemoryTracking aliases in src/Compression. Mark a few
spots as STYLE_CHECK_ALLOW_STD_CONTAINERS where the type is bound to
IFactoryWithAliases::InnerMap covariance or referenced in a documentation
comment block. Add src/Compression to the directories linted by
check_cpp.sh.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add `static` to file-local functions and forward declarations
for cross-TU functions to satisfy `-Wmissing-prototypes`.
This ensures all functions have visible prototypes before their
definitions, improving code quality and catching accidental
linkage issues.
Reference: https://github.com/ClickHouse/ClickHouse/issues/76944
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Move `getAllRegisteredNames` implementations from headers to .cpp files
for `CompressionCodecFactory`, `MergeTreeIndexFactory`,
`DictionaryFactory`, and `DictionarySourceFactory`.
- Fix double-counting of opening parenthesis when a dictionary value
is a function call — the deferred bareword handler now emits the
paren and continues instead of falling through.
- Add test cases for function calls in dict values, nested parens,
and dict keywords outside dictionary context.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add a new virtual function getNotes that returns documentation for the codec taken from:
https://kb.altinity.com/altinity-kb-schema-design/codecs/
* src/Compression/ICompressionCodec.h (getData) : New interface function. And update in all derived classes.
* src/Storages/System/StorageSystemCodecs.{h,cpp} : New files with the new table class.
* src/Storages/System/StorageSystemCodecs.{h,cpp} (getMutableColumns) : New function to get columns information accessing the private members in CompressionCodecFactory
* src/Storages/System/attachSystemTables.cpp : Attach the new table to system.
Sorry for the clickbaity title. This is about static method
ConnectionTimeouts::getHTTPTimeouts(). It was be declared in header
IO/ConnectionTimeouts.h, and defined in header
IO/ConnectionTimeoutsContext.h (!). This is weird and caused issues with
linking on s390x (##45520). There was an attempt to fix some
inconsistencies (#45848) but neither did @Algunenano nor me at first
really understand why the definition is in the header.
Turns out that ConnectionTimeoutsContext.h is only #include'd from
source files which are part of the normal server build BUT NOT part of
the keeper standalone build (which must be enabled via CMake
-DBUILD_STANDALONE_KEEPER=1). This dependency was not documented and as
a result, some misguided workarounds were introduced earlier, e.g.
https://github.com/ClickHouse/ClickHouse/pull/38475/commits/0341c6c54bd7ac77200b4ca123208b195514ef20
The deeper cause was that getHTTPTimeouts() is passed a "Context". This
class is part of the "dbms" libary which is deliberately not linked by
the standalone build of clickhouse-keeper. The context is only used to
read the settings and the "Settings" class is part of the
clickhouse_common library which is linked by clickhouse-keeper already.
To resolve this mess, this PR
- creates source file IO/ConnectionTimeouts.cpp and moves all
ConnectionTimeouts definitions into it, including getHTTPTimeouts().
- breaks the wrong dependency by passing "Settings" instead of "Context"
into getHTTPTimeouts().
- resolves the previous hacks
* save format string for NetException
* format exceptions
* format exceptions 2
* format exceptions 3
* format exceptions 4
* format exceptions 5
* format exceptions 6
* fix
* format exceptions 7
* format exceptions 8
* Update MergeTreeIndexGin.cpp
* Update AggregateFunctionMap.cpp
* Update AggregateFunctionMap.cpp
* fix