MCPcopy Create free account
hub / github.com/apache/orc / updateSelectedByName

Method updateSelectedByName

c++/src/Reader.cc:229–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 }
228
229 void ColumnSelector::updateSelectedByName(std::vector<bool>& selectedColumns,
230 const std::string& fieldName) {
231 std::map<std::string, uint64_t>::const_iterator ite = nameIdMap_.find(fieldName);
232 if (ite != nameIdMap_.end()) {
233 updateSelectedByTypeId(selectedColumns, ite->second);
234 } else {
235 bool first = true;
236 std::ostringstream ss;
237 ss << "Invalid column selected " << fieldName << ". Valid names are ";
238 for (auto it = nameIdMap_.begin(); it != nameIdMap_.end(); ++it) {
239 if (!first) ss << ", ";
240 ss << it->first;
241 first = false;
242 }
243 throw ParseError(ss.str());
244 }
245 }
246
247 ColumnSelector::ColumnSelector(const FileContents* contents) : contents_(contents) {
248 buildTypeNameIdMap(contents_->schema.get());

Callers 1

getMemoryUseByNameMethod · 0.80

Calls 2

ParseErrorClass · 0.85
endMethod · 0.65

Tested by

no test coverage detected