You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/12/04 01:27:26 UTC

[GitHub] [arrow] wjones127 commented on a change in pull request #11855: ARROW-13735: [C++][Python] Creating a Map array with non-default field names segfaults

wjones127 commented on a change in pull request #11855:
URL: https://github.com/apache/arrow/pull/11855#discussion_r762366744



##########
File path: cpp/src/arrow/array/builder_nested.h
##########
@@ -329,9 +329,7 @@ class ARROW_EXPORT MapBuilder : public ArrayBuilder {
   /// the Map to be built as a list of struct values.
   ArrayBuilder* value_builder() const { return list_builder_->value_builder(); }
 
-  std::shared_ptr<DataType> type() const override {
-    return map(key_builder_->type(), item_builder_->type(), keys_sorted_);
-  }
+  std::shared_ptr<DataType> type() const override { return type_; }

Review comment:
       Note that the `map` construction I deleted is already used to set the type when it isn't explicitly passed.
   
   https://github.com/apache/arrow/blob/e734856676a00335f3dfe79899a995d87286f5a9/cpp/src/arrow/array/builder_nested.cc#L52-L55




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org