2018-08-10 17:42:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <ext/shared_ptr_helper.h>
|
|
|
|
#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>
|
|
|
|
class SystemMergeTreeSettings final : public ext::shared_ptr_helper<SystemMergeTreeSettings<replicated>>,
|
|
|
|
public IStorageSystemOneBlock<SystemMergeTreeSettings<replicated>>
|
2018-08-10 17:42:12 +00:00
|
|
|
{
|
2020-08-23 12:38:52 +00:00
|
|
|
friend struct ext::shared_ptr_helper<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
|
|
|
|
|
|
|
void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|