128 auto typeGenerator = [](std::shared_ptr<arrow::DataType>
const&
type,
int list_size) -> std::shared_ptr<arrow::DataType> {
131 return arrow::list(
type);
133 return std::move(
type);
139 if constexpr (std::is_arithmetic_v<T>) {
140 if constexpr (std::same_as<T, bool>) {
141 return typeGenerator(arrow::boolean(),
list_size);
142 }
else if constexpr (std::same_as<T, uint8_t>) {
143 return typeGenerator(arrow::uint8(),
list_size);
144 }
else if constexpr (std::same_as<T, uint16_t>) {
145 return typeGenerator(arrow::uint16(),
list_size);
146 }
else if constexpr (std::same_as<T, uint32_t>) {
147 return typeGenerator(arrow::uint32(),
list_size);
148 }
else if constexpr (std::same_as<T, uint64_t>) {
149 return typeGenerator(arrow::uint64(),
list_size);
150 }
else if constexpr (std::same_as<T, int8_t>) {
151 return typeGenerator(arrow::int8(),
list_size);
152 }
else if constexpr (std::same_as<T, int16_t>) {
153 return typeGenerator(arrow::int16(),
list_size);
154 }
else if constexpr (std::same_as<T, int32_t>) {
155 return typeGenerator(arrow::int32(),
list_size);
156 }
else if constexpr (std::same_as<T, int64_t>) {
157 return typeGenerator(arrow::int64(),
list_size);
158 }
else if constexpr (std::same_as<T, float>) {
159 return typeGenerator(arrow::float32(),
list_size);
160 }
else if constexpr (std::same_as<T, double>) {
161 return typeGenerator(arrow::float64(),
list_size);
163 }
else if constexpr (std::is_bounded_array_v<T>) {
164 return asArrowDataType<array_element_t<T>>(std::extent_v<T>);
165 }
else if constexpr (o2::framework::is_specialization_v<T, std::vector>) {
166 return asArrowDataType<typename T::value_type>(-1);