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 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

Reply via email to