Thanks for the suggestion Sasha! Will give it a try.

On Tue, Mar 21, 2023 at 12:30 PM Sasha Krassovsky <[email protected]>
wrote:

> Hi Haocheng,
> I agree that the Project node could be a good candidate for this. One of
> the expressions that Project can take is called “cast”. In C++ you would do
> something like
>
> Expression cast_expr = call(“cast”, my_column,
> compute::CastOptions::Unsafe(uint32()));
>
> And pass that expression to your Project node.
>
> Hope this helps,
> Sasha
>
> 21 марта 2023 г., в 09:10, Haocheng Liu <[email protected]> написал(а):
>
> 
> Hi,
>
> I have a use case that my reader node will read in POD types as int8_t,
> int16_t, int32.t, etc from a bespoke format. Due to downstream
> library requirements, I have to upcast *all* int8_t and int16_t columns
> to int32_t. Based on my reading the Project node
> <https://arrow.apache.org/docs/cpp/streaming_execution.html#project> looks
> most promising for this type of workflow.
>
> I check the examples in source code and online documentation, to my best
> knowledge they only cover how to apply predefined functions rather than
> doing a type conversion. Can anyone guide what's the best practice here in
> C++?
>
> Thanks.
>
> Best regards
> Haocheng
>
>

-- 
Best regards

Reply via email to