ClickHouse/src/Storages/System/StorageSystemWarnings.cpp
2021-07-12 12:21:18 +00:00

20 lines
465 B
C++

#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);
}
}