These functions are slow and may impose security considerations.
-
Install the
clickhouse-common-static-dbgpackage. - Set the allow_introspection_functions setting to 1. For security reasons introspection functions are disabled by default.
addressToLine
Introduced in: v20.1.0 Converts a virtual memory address inside the ClickHouse server process to a filename and line number in ClickHouse’s source code.This function is slow and may impose security considerations.
- Install the
clickhouse-common-static-dbgpackage. - Set setting
allow_introspection_functionsto1.
address_of_binary_instruction— Address of instruction in a running process.UInt64
/build/obj-x86_64-linux-gnu/../src/Common/ThreadPool.cpp:199. Returns the name of a binary, if no debug information could be found, otherwise an empty string, if the address is not valid. String
Examples
Selecting the first string from the trace_log system table
Query
Response
Query
Response
Query
Response
addressToLineWithInlines
Introduced in: v22.2.0 Similar toaddressToLine, but returns an Array with all inline functions.
As a result of this, it is slower than addressToLine.
To enable this introspection function:
- Install the
clickhouse-common-static-dbgpackage. - Set setting
allow_introspection_functionsto1.
address_of_binary_instruction— The address of an instruction in a running process.UInt64
Array(String)
Examples
Applying the function to an address
Query
Response
Query
Response
addressToSymbol
Introduced in: v20.1.0 Converts virtual memory address inside the ClickHouse server process to a symbol from ClickHouse’s object files. Syntaxaddress_of_binary_instruction— Address of instruction in a running process.UInt64
String
Examples
Selecting the first string from the trace_log system table
Query
Response
Query
Response
Query
Response
demangle
Introduced in: v20.1.0 Converts a symbol to a C++ function name. The symbol is usually returned by functionaddressToSymbol.
Syntax
symbol— Symbol from an object file.String
String
Examples
Selecting the first string from the trace_log system table
Query
Response
Query
Response
Query
Response
isMergeTreePartCoveredBy
Introduced in: v25.6.0 Function which checks if the part of the first argument is covered by the part of the second argument. Syntaxnested_part— Name of expected nested part.Stringcovering_part— Name of expected covering part.String
1 if it covers, 0 otherwise. UInt8
Examples
Basic example
Query
Response
logTrace
Introduced in: v20.12.0 Emits a trace log message to the server log. The function accepts a constant argument only, so the call is evaluated during query analysis and replaced by its result. The message is therefore emitted once while the query is analyzed, and not once per processed Block: the number of rows and the settingmax_block_size have no effect
on how many messages appear in the log.
Syntax
message— Message that is emitted to the server log.const String
0 always. UInt8
Examples
Basic example
Query
Response
mergeTreePartInfo
Introduced in: v25.6.0 Function that helps to cut the useful values out of theMergeTree part name.
Syntax
part_name— Name of part to unpack.String
partition_id, min_block, max_block, level, mutation. Tuple
Examples
Basic example
Query
Response
tid
Introduced in: v20.12.0 Returns id of the thread, in which the current Block is processed. Syntax- None.
UInt64
Examples
Usage example
Query
Response