diff --git a/java/dataset/src/main/cpp/jni_wrapper.cc b/java/dataset/src/main/cpp/jni_wrapper.cc index 399f2188dc7c3..02de65634cd71 100644 --- a/java/dataset/src/main/cpp/jni_wrapper.cc +++ b/java/dataset/src/main/cpp/jni_wrapper.cc @@ -385,12 +385,12 @@ arrow::Result 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& 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(); @@ -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& out) { - ARROW_ASSIGN_OR_RAISE(auto struct, ParseFromBuffer(buf)); - return FromProto(struct, out); + ARROW_ASSIGN_OR_RAISE(auto struct_config, ParseFromBuffer(buf)); + return FromProto(struct_config, out); } inline bool ParseBool(const std::string& value) { return value == "true" ? true : false; }