2018-08-10 17:42:12 +00:00
|
|
|
#include <DataTypes/DataTypeString.h>
|
|
|
|
#include <DataTypes/DataTypesNumber.h>
|
|
|
|
#include <Interpreters/Context.h>
|
|
|
|
#include <Storages/System/StorageSystemMergeTreeSettings.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
NamesAndTypesList SystemMergeTreeSettings::getNamesAndTypes()
|
|
|
|
{
|
|
|
|
return {
|
|
|
|
{"name", std::make_shared<DataTypeString>()},
|
|
|
|
{"value", std::make_shared<DataTypeString>()},
|
|
|
|
{"changed", std::make_shared<DataTypeUInt8>()},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
void SystemMergeTreeSettings::fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo &) const
|
|
|
|
{
|
2019-04-25 14:08:20 +00:00
|
|
|
for (const auto & setting : context.getMergeTreeSettings())
|
|
|
|
{
|
|
|
|
res_columns[0]->insert(setting.getName().toString());
|
|
|
|
res_columns[1]->insert(setting.getValueAsString());
|
|
|
|
res_columns[2]->insert(setting.isChanged());
|
|
|
|
}
|
2018-08-10 17:42:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|