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

Function MakeRandomLargeListViewArray

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

Source from the content-addressed store, hash-verified

202}
203
204Status MakeRandomLargeListViewArray(const std::shared_ptr<Array>& child_array,
205 int num_lists, bool include_nulls, MemoryPool* pool,
206 std::shared_ptr<Array>* out) {
207 const auto seed = static_cast<uint32_t>(child_array->length());
208 random::RandomArrayGenerator rand(seed);
209
210 const double null_probability = include_nulls ? 0.5 : 0.0;
211 *out = rand.LargeListView(*child_array, /*length=*/num_lists, null_probability,
212 /*force_empty_nulls=*/false,
213 /*force_empty_nulls=*/0.9, kDefaultBufferAlignment, pool);
214 return Status::OK();
215}
216
217Status MakeRandomMapArray(const std::shared_ptr<Array>& key_array,
218 const std::shared_ptr<Array>& item_array, int num_maps,

Callers 1

Calls 3

LargeListViewMethod · 0.80
OKFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected