[
https://issues.apache.org/jira/browse/ARROW-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16345265#comment-16345265
]
ASF GitHub Bot commented on ARROW-1705:
---------------------------------------
wesm commented on a change in pull request #1530: ARROW-1705: [Python] allow
building array from dicts
URL: https://github.com/apache/arrow/pull/1530#discussion_r164783634
##########
File path: cpp/src/arrow/python/builtin_convert.cc
##########
@@ -809,6 +858,39 @@ Status ListConverter::Init(ArrayBuilder* builder) {
return value_converter_->Init(typed_builder_->value_builder());
}
+Status StructConverter::Init(ArrayBuilder* builder) {
+ builder_ = builder;
+ typed_builder_ = static_cast<StructBuilder*>(builder);
+ StructType* struct_type = static_cast<StructType*>(builder->type().get());
+
+ num_fields_ = typed_builder_->num_fields();
+ assert(num_fields_ == struct_type->num_children());
Review comment:
`DCHECK_EQ`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> [Python] Create StructArray from sequence of dicts given a known data type
> --------------------------------------------------------------------------
>
> Key: ARROW-1705
> URL: https://issues.apache.org/jira/browse/ARROW-1705
> Project: Apache Arrow
> Issue Type: New Feature
> Components: Python
> Reporter: Wes McKinney
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.9.0
>
>
> See https://github.com/apache/arrow/issues/1217
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)