pitrou commented on code in PR #14100:
URL: https://github.com/apache/arrow/pull/14100#discussion_r977377593
##########
cpp/src/arrow/json/parser.cc:
##########
@@ -383,13 +392,14 @@ class RawArrayBuilder<Kind::kObject> {
private:
struct FieldInfo {
- string_view name; // Backed by key's allocation in name_to_index_
+ std::unique_ptr<std::string> name;
BuilderPtr builder;
};
Review Comment:
A separate list sounds better. It might not even be much more costly (in
both cases you have one extra allocation per string).
--
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]