ClickHouse/src/Storages/System/StorageSystemWarnings.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
467 B
C++
Raw Normal View History

2021-07-09 09:27:51 +00:00
#include <Interpreters/Context.h>
2021-07-12 12:21:18 +00:00
#include <Storages/System/StorageSystemWarnings.h>
2021-07-09 09:27:51 +00:00
2021-07-13 00:59:52 +00:00
2021-07-12 12:21:18 +00:00
namespace DB
2021-07-09 09:27:51 +00:00
{
2021-07-13 00:59:52 +00:00
2021-07-09 09:27:51 +00:00
NamesAndTypesList StorageSystemWarnings::getNamesAndTypes()
{
return {
2021-07-09 14:40:32 +00:00
{"message", std::make_shared<DataTypeString>()},
2021-07-09 09:27:51 +00:00
};
}
void StorageSystemWarnings::fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const
{
2021-07-12 12:21:18 +00:00
for (const auto & warning : context->getWarnings())
2021-07-12 10:57:39 +00:00
res_columns[0]->insert(warning);
2021-07-09 09:27:51 +00:00
}
}