MCPcopy Create free account
hub / github.com/apache/arrow / NonNullArray

Function NonNullArray

cpp/src/parquet/arrow/test_util.h:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72template <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
90template <class ArrowType>
91::arrow::enable_if_integer<ArrowType, Status> NonNullArray(size_t size,

Callers

nothing calls this directly

Calls 14

random_float16_numbersFunction · 0.85
random_realFunction · 0.85
randintFunction · 0.85
default_memory_poolFunction · 0.85
fixed_size_binaryFunction · 0.85
resizeMethod · 0.80
Float16Class · 0.50
dataMethod · 0.45
AppendValuesMethod · 0.45
sizeMethod · 0.45
FinishMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected