MCPcopy Create free account
hub / github.com/apache/arrow / EncodeFunction

Method EncodeFunction

cpp/src/arrow/engine/substrait/extension_set.cc:327–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327Result<uint32_t> ExtensionSet::EncodeFunction(Id function_id) {
328 RETURN_NOT_OK(this->AddUri(function_id));
329 auto it_success =
330 functions_map_.emplace(function_id, static_cast<uint32_t>(functions_map_.size()));
331 if (it_success.second) {
332 DCHECK_EQ(functions_.find(static_cast<uint32_t>(functions_.size())), functions_.end())
333 << "Function existed in functions_ but not functions_map_. ExtensionSet is "
334 "inconsistent";
335 functions_[static_cast<uint32_t>(functions_.size())] = function_id;
336 }
337 return it_success.first->second;
338}
339
340template <typename KeyToIndex, typename Key>
341const int* GetIndex(const KeyToIndex& key_to_index, const Key& key) {

Callers

nothing calls this directly

Calls 4

AddUriMethod · 0.95
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected