| 71 | |
| 72 | template <class ArrowType> |
| 73 | ::arrow::enable_if_floating_point<ArrowType, Status> NonNullArray( |
| 74 | size_t size, std::shared_ptr<Array>* out) { |
| 75 | using c_type = typename ArrowType::c_type; |
| 76 | std::vector<c_type> values; |
| 77 | if constexpr (::arrow::is_half_float_type<ArrowType>::value) { |
| 78 | values.resize(size); |
| 79 | test::random_float16_numbers(static_cast<int>(size), 0, ::arrow::util::Float16(0.0f), |
| 80 | ::arrow::util::Float16(1.0f), values.data()); |
| 81 | } else { |
| 82 | ::arrow::random_real(size, 0, static_cast<c_type>(0), static_cast<c_type>(1), |
| 83 | &values); |
| 84 | } |
| 85 | ::arrow::NumericBuilder<ArrowType> builder; |
| 86 | RETURN_NOT_OK(builder.AppendValues(values.data(), values.size())); |
| 87 | return builder.Finish(out); |
| 88 | } |
| 89 | |
| 90 | template <class ArrowType> |
| 91 | ::arrow::enable_if_integer<ArrowType, Status> NonNullArray(size_t size, |
nothing calls this directly
no test coverage detected