Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchengchenghh committed Jun 17, 2024
1 parent 0e135ff commit a893605
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions java/dataset/src/main/cpp/jni_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,12 @@ arrow::Result<Message> ParseFromBuffer(const arrow::Buffer& buf) {
return message;
}

arrow::Status FromProto(const google::protobuf::Struct& struct,
arrow::Status FromProto(const google::protobuf::Struct& struct_config,
std::unordered_map<std::string, std::string>& out) {
if (struct.fields().empty()) {
if (struct_config.fields().empty()) {
return arrow::Status::OK();
}
for (const auto& [name, value] : struct.fields()) {
for (const auto& [name, value] : struct_config.fields()) {
out.emplace(name, value.string_value());
}
return arrow::Status::OK();
Expand All @@ -402,8 +402,8 @@ arrow::Status FromProto(const google::protobuf::Struct& struct,
/// \param[out] out deserialize to this map.
arrow::Status DeserializeMap(const arrow::Buffer& buf,
std::unordered_map<std::string, std::string>& out) {
ARROW_ASSIGN_OR_RAISE(auto struct, ParseFromBuffer<google::protobuf::Struct>(buf));
return FromProto(struct, out);
ARROW_ASSIGN_OR_RAISE(auto struct_config, ParseFromBuffer<google::protobuf::Struct>(buf));
return FromProto(struct_config, out);
}

inline bool ParseBool(const std::string& value) { return value == "true" ? true : false; }
Expand Down

0 comments on commit a893605

Please sign in to comment.