Opened https://issues.apache.org/jira/browse/ARROW-13462
to track correction of the doc's examples

On Tue, Jul 27, 2021 at 11:59 AM Benjamin Kietzman <bengil...@gmail.com>
wrote:

> Sorry, that is a typo. I will open a JIRA to fix the doc.
>
> In the meantime, incremented_datum.make_array() should work for you
>
> On Tue, Jul 27, 2021, 11:57 Rares Vernica <rvern...@gmail.com> wrote:
>
>> Hi,
>>
>> I'm trying the example in the Compute Functions user guide
>> https://arrow.apache.org/docs/cpp/compute.html#invoking-functions
>>
>> std::shared_ptr<arrow::Array> numbers_array =
>> ...;std::shared_ptr<arrow::Scalar> increment = ...;arrow::Datum
>> incremented_datum;
>> ARROW_ASSIGN_OR_RAISE(incremented_datum,
>>                       arrow::compute::CallFunction("add",
>> {numbers_array, increment}));std::shared_ptr<Array> incremented_array
>> = std::move(incremented_datum).array();
>>
>> and I'm getting this compilation error:
>>
>> error: conversion from 'const std::shared_ptr<arrow::ArrayData>' to
>> non-scalar type 'std::shared_ptr<scidb::Array>' requested
>>          std::shared_ptr<Array> incremented_array =
>> std::move(incremented_datum).array();
>>
>> I'm using Arrow 3.0.0. Is there a conversion I can make from ArrowData to
>> Arrow. I need the result to be Arrow because I'm adding it as a new column
>> to a RecordBatch using AddColumn.
>>
>> Thanks!
>> Rares
>>
>

Reply via email to