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

Function MakeRandomByteBuffer

cpp/src/arrow/testing/util.cc:107–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107Status MakeRandomByteBuffer(int64_t length, MemoryPool* pool,
108 std::shared_ptr<ResizableBuffer>* out, uint32_t seed) {
109 ARROW_ASSIGN_OR_RAISE(auto result, AllocateResizableBuffer(length, pool));
110 random_bytes(length, seed, result->mutable_data());
111 *out = std::move(result);
112 return Status::OK();
113}
114
115Result<std::string> GetTestResourceRoot() {
116 auto maybe_var = ::arrow::internal::GetEnvVar("ARROW_TEST_DATA");

Callers 5

TEST_FFunction · 0.85
TestWritesMethod · 0.85
GetPerfBatchesFunction · 0.85
GetPutDataFunction · 0.85

Calls 3

random_bytesFunction · 0.70
OKFunction · 0.50
mutable_dataMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
TestWritesMethod · 0.68