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/08 16:56:39 UTC
[GitHub] [arrow] pitrou commented on a change in pull request #11855: ARROW-13735: [C++][Python] Creating a Map array with non-default field names segfaults
pitrou commented on a change in pull request #11855:
URL: https://github.com/apache/arrow/pull/11855#discussion_r765050118
##########
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:
Hmm... unfortunately, I don't think this is right. Some child builders can actually change type over time (for example the index width of a dictionary may increase depending on the dictionary size). So we have to keep the dynamic computation in the `type()` method.
--
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