MCPcopy Create free account
hub / github.com/ByConity/ByConity / getPositionByName

Method getPositionByName

src/DataTypes/DataTypeTuple.cpp:193–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191
192
193size_t DataTypeTuple::getPositionByName(std::string_view name) const
194{
195 size_t size = elems.size();
196 for (size_t i = 0; i < size; ++i)
197 if (names[i] == name)
198 return i;
199 throw Exception(ErrorCodes::NOT_FOUND_COLUMN_IN_BLOCK, "Tuple doesn't have element with name '{}'", name);
200}
201
202
203std::optional<size_t> DataTypeTuple::tryGetPositionByName(std::string_view name) const

Callers 9

executeMethod · 0.45
calculateAggregatesMethod · 0.45
finalizeAggregatesMethod · 0.45
getTableDataBufferMethod · 0.45

Calls 2

ExceptionClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected