2018-08-10 17:42:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Storages/MergeTree/MergeTreeSettings.h>
|
|
|
|
#include <Storages/System/IStorageSystemOneBlock.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class Context;
|
|
|
|
|
|
|
|
|
2020-08-23 12:38:52 +00:00
|
|
|
/** implements system table "merge_tree_settings" and "replicated_merge_tree_settings",
|
|
|
|
* which allows to get information about the current MergeTree settings.
|
2018-08-10 17:42:12 +00:00
|
|
|
*/
|
2020-08-23 12:38:52 +00:00
|
|
|
template <bool replicated>
|
2022-05-03 06:43:28 +00:00
|
|
|
class SystemMergeTreeSettings final : public IStorageSystemOneBlock<SystemMergeTreeSettings<replicated>>
|
2018-08-10 17:42:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2020-08-23 12:38:52 +00:00
|
|
|
std::string getName() const override { return replicated ? "SystemReplicatedMergeTreeSettings" : "SystemMergeTreeSettings"; }
|
2018-08-10 17:42:12 +00:00
|
|
|
|
|
|
|
static NamesAndTypesList getNamesAndTypes();
|
|
|
|
|
|
|
|
protected:
|
2020-08-23 12:38:52 +00:00
|
|
|
using IStorageSystemOneBlock<SystemMergeTreeSettings<replicated>>::IStorageSystemOneBlock;
|
2018-08-10 17:42:12 +00:00
|
|
|
|
2021-04-10 23:33:54 +00:00
|
|
|
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo & query_info) const override;
|
2018-08-10 17:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|