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

Function EnumToString

cpp/src/arrow/engine/substrait/util_internal.cc:27–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace engine {
26
27std::string EnumToString(int value, const google::protobuf::EnumDescriptor& descriptor) {
28 const google::protobuf::EnumValueDescriptor* value_desc =
29 descriptor.FindValueByNumber(value);
30 if (value_desc == nullptr) {
31 return "unknown";
32 }
33 return std::string(value_desc->name());
34}
35
36std::unique_ptr<substrait::Version> CreateVersion() {
37 auto version = std::make_unique<substrait::Version>();

Callers 2

FromProtoFunction · 0.85
FromProtoFunction · 0.85

Calls 1

nameMethod · 0.45

Tested by

no test coverage detected