Reranko05 commented on code in PR #50937:
URL: https://github.com/apache/arrow/pull/50937#discussion_r3866598917
##########
cpp/src/arrow/integration/json_internal.cc:
##########
@@ -1232,34 +1238,44 @@ template <typename FieldOrStruct>
Result<std::shared_ptr<KeyValueMetadata>> GetKeyValueMetadata(
const FieldOrStruct& field_or_struct) {
auto metadata = std::make_shared<KeyValueMetadata>();
- auto it = field_or_struct.FindMember("metadata");
- if (it == field_or_struct.MemberEnd() || it->value.IsNull()) {
+
+ auto metadata_result = field_or_struct["metadata"];
+ if (metadata_result.error() == simdjson::NO_SUCH_FIELD) {
return metadata;
}
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]