1 | #include <DataTypes/DataTypeString.h> |
2 | #include <DataTypes/DataTypesNumber.h> |
3 | #include <Interpreters/Context.h> |
4 | #include <Storages/System/StorageSystemMergeTreeSettings.h> |
5 | |
6 | |
7 | namespace DB |
8 | { |
9 | |
10 | NamesAndTypesList SystemMergeTreeSettings::getNamesAndTypes() |
11 | { |
12 | return { |
13 | {"name" , std::make_shared<DataTypeString>()}, |
14 | {"value" , std::make_shared<DataTypeString>()}, |
15 | {"changed" , std::make_shared<DataTypeUInt8>()}, |
16 | {"description" , std::make_shared<DataTypeString>()}, |
17 | }; |
18 | } |
19 | |
20 | void SystemMergeTreeSettings::fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo &) const |
21 | { |
22 | for (const auto & setting : context.getMergeTreeSettings()) |
23 | { |
24 | res_columns[0]->insert(setting.getName().toString()); |
25 | res_columns[1]->insert(setting.getValueAsString()); |
26 | res_columns[2]->insert(setting.isChanged()); |
27 | res_columns[3]->insert(setting.getDescription().toString()); |
28 | } |
29 | } |
30 | |
31 | } |
32 | |