ClickHouse/src/Storages/System/StorageSystemWarnings.cpp
Alexey Milovidov 29e8b783ba Comments
2021-07-13 03:59:52 +03:00

22 lines
467 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);
}
}