MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getSampleBlock

Function getSampleBlock

src/Interpreters/ProfileEventsExt.cpp:122–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122DB::Block getSampleBlock()
123{
124 using namespace DB;
125 static const NamesAndTypesList column_names_and_types = {
126 {"host_name", std::make_shared<DataTypeString>()},
127 {"current_time", std::make_shared<DataTypeDateTime>()},
128 {"thread_id", std::make_shared<DataTypeUInt64>()},
129 {"type", TypeEnum},
130 {"name", std::make_shared<DataTypeString>()},
131 {"value", std::make_shared<DataTypeInt64>()},
132 };
133
134 ColumnsWithTypeAndName temp_columns;
135 for (auto const & name_and_type : column_names_and_types)
136 temp_columns.emplace_back(name_and_type.type, name_and_type.name);
137
138 return Block(std::move(temp_columns));
139}
140
141DB::Block getProfileEvents(
142 const String & host_name,

Callers 15

getSampleColumnsMethod · 0.70
pushBlockMethod · 0.70
getTableMethod · 0.70
getSampleBlockMethod · 0.70
buildInsertPipelineMethod · 0.70
executeMethod · 0.70
getProfileEventsFunction · 0.70

Calls 2

BlockClass · 0.70
emplace_backMethod · 0.45

Tested by

no test coverage detected