Hi,

I find myself in need of a function to turn a vector of Scalar to an Array
of the same datatype. The data type is known at the runtime. e.g.

shared_ptr<ArrayData> concat_scalars(vector<shared_ptr<Scalar> values.
shared_ptr<DataType> type);

I wonder if I need to use sth like Scalar::Accept(ScalarVisitor*) or is
there an easier/better way to achieve this?

For context, I am trying to implement UDF support for hash aggregation,
each UDF invocation will give me back one Scalar (for each group), and I
need to concat them in the HashAggregateKernel finalize method. So
performance is not a large concern here, time in the UDF would likely
dominate the total runtime.

Thanks!
Li

Reply via email to