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

Function MakeRandomArray

cpp/src/arrow/ipc/test_common.cc:106–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104
105template <typename ArrayType>
106Status MakeRandomArray(int64_t length, bool include_nulls, MemoryPool* pool,
107 std::shared_ptr<Array>* out, uint32_t seed) {
108 random::RandomArrayGenerator rand(seed);
109 const double null_probability = include_nulls ? 0.5 : 0.0;
110
111 *out = rand.Numeric<ArrayType>(length, 0, 1000, null_probability);
112
113 return Status::OK();
114}
115
116template <>
117Status MakeRandomArray<Int8Type>(int64_t length, bool include_nulls, MemoryPool* pool,

Callers

nothing calls this directly

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected