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

Function MakeStrings

cpp/src/arrow/util/cache_benchmark.cc:40–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38static constexpr int32_t kLargeValueLength = 1024;
39
40static std::vector<std::string> MakeStrings(int64_t nvalues, int64_t min_length,
41 int64_t max_length) {
42 auto rng = ::arrow::random::RandomArrayGenerator(42);
43 auto arr = checked_pointer_cast<StringArray>(rng.String(
44 nvalues, static_cast<int32_t>(min_length), static_cast<int32_t>(max_length)));
45 std::vector<std::string> vec(nvalues);
46 for (int64_t i = 0; i < nvalues; ++i) {
47 vec[i] = arr->GetString(i);
48 }
49 return vec;
50}
51
52static std::vector<std::string> MakeStrings(int64_t nvalues, int64_t length) {
53 return MakeStrings(nvalues, length, length);

Callers 3

LruCacheLookupFunction · 0.70
MemoizeLruCachedFunction · 0.70

Calls 2

StringMethod · 0.45
GetStringMethod · 0.45

Tested by

no test coverage detected