Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/src/arrow/engine/substrait/expression_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ std::string EnumToString(int value, const google::protobuf::EnumDescriptor* desc
if (value_desc == nullptr) {
return "unknown";
}
return value_desc->name();
return std::string(value_desc->name());
}

Result<compute::Expression> FromProto(const substrait::Expression::ReferenceSegment* ref,
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/engine/substrait/serde.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ Status ParseFromBufferImpl(const Buffer& buf, const std::string& full_name,
template <typename Message>
Result<Message> ParseFromBuffer(const Buffer& buf) {
Message message;
ARROW_RETURN_NOT_OK(
ParseFromBufferImpl(buf, Message::descriptor()->full_name(), &message));
ARROW_RETURN_NOT_OK(ParseFromBufferImpl(
buf, std::string(Message::descriptor()->full_name()), &message));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead we can change the ParseFromBufferImpl signature to take a string_view

return message;
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/engine/substrait/util_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ std::string EnumToString(int value, const google::protobuf::EnumDescriptor& desc
if (value_desc == nullptr) {
return "unknown";
}
return value_desc->name();
return std::string(value_desc->name());
}

std::unique_ptr<substrait::Version> CreateVersion() {
Expand Down