aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Storages/System/StorageSystemWarnings.cpp
blob: 76b35e9b555ee707ae3302118567235ed6463d66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <Interpreters/Context.h>
#include <Storages/System/StorageSystemWarnings.h>


namespace DB
{

NamesAndTypesList StorageSystemWarnings::getNamesAndTypes()
{
    return {
        {"message", std::make_shared<DataTypeString>()},
    };
}

void StorageSystemWarnings::fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const
{
    for (const auto & warning : context->getWarnings())
        res_columns[0]->insert(warning);
}

}