[
https://issues.apache.org/jira/browse/ARROW-1543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16190669#comment-16190669
]
ASF GitHub Bot commented on ARROW-1543:
---------------------------------------
GitHub user wesm opened a pull request:
https://github.com/apache/arrow/pull/1157
ARROW-1543: [C++] Correct C++ tutorial to use std::unique_ptr instead of
std::shared_ptr
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wesm/arrow ARROW-1543
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/arrow/pull/1157.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1157
----
commit 7df6dd2379aec1790393c66b65a639819433c83f
Author: Wes McKinney <[email protected]>
Date: 2017-10-04T01:50:58Z
Correct C++ tutorial to use std::unique_ptr instead of std::shared_ptr
Change-Id: If6a8f07ced156cc2558092d45a091fcadf0592a8
----
> row_wise_conversion example doesn't correspond to ListBuilder constructor
> arguments
> -----------------------------------------------------------------------------------
>
> Key: ARROW-1543
> URL: https://issues.apache.org/jira/browse/ARROW-1543
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 0.7.0
> Reporter: Johan Peltenburg
> Assignee: Wes McKinney
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 0.8.0
>
>
> In the row_wise_conversion code example we find:
> {code}
> std::shared_ptr<DoubleBuilder> components_values_builder =
> std::make_shared<DoubleBuilder>(arrow::default_memory_pool());
> arrow::ListBuilder components_builder(arrow::default_memory_pool(),
> components_values_builder);
> {code}
> This generates some compile time errors since the second argument of the
> ListBuilder constructor expects a unique pointer.
> However, I guess the example shows the correct case, where we want to still
> be able to use the DoubleBuilder after constructing the ListBuilder, so I
> probably shouldn't std::move it to the constructor as a unique_ptr.
> I'm not sure how to fix this as I don't know which functionality is desired.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)