v.25.5New Feature

Add getServerSetting and getMergeTreeSetting

Add getServerSetting and getMergeTreeSetting function. Closes #78318. #78439 (NamNguyenHoai).
Introduces two new functions: getServerSetting and getMergeTreeSetting to retrieve runtime configuration settings in ClickHouse queries.

Why it matters

These functions allow users to access the current values of server and MergeTree settings directly within their queries, helping to dynamically adapt query behavior based on configuration without external tools or manual checks.

How to use it

Use getServerSetting('setting_name') to get the value of a server setting, and getMergeTreeSetting('setting_name') to get a MergeTree-specific setting. For example:
sql<br>SELECT getServerSetting('max_memory_usage');<br>SELECT getMergeTreeSetting('index_granularity');<br>