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

Method GetEnumArg

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

Source from the content-addressed store, hash-verified

134std::unique_ptr<IdStorage> IdStorage::Make() { return std::make_unique<IdStorageImpl>(); }
135
136Result<std::string_view> SubstraitCall::GetEnumArg(int index) const {
137 if (index >= size_) {
138 return Status::Invalid("Expected Substrait call to have an enum argument at index ",
139 index, " but it did not have enough arguments");
140 }
141 auto enum_arg_it = enum_args_.find(index);
142 if (enum_arg_it == enum_args_.end()) {
143 return Status::Invalid("Expected Substrait call to have an enum argument at index ",
144 index, " but the argument was not an enum.");
145 }
146 return enum_arg_it->second;
147}
148
149bool SubstraitCall::HasEnumArg(int index) const {
150 return enum_args_.find(index) != enum_args_.end();

Callers

nothing calls this directly

Calls 3

InvalidFunction · 0.50
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected