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

Function MakeSequentialIntegers

cpp/src/arrow/util/hashing_test.cc:58–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57template <typename Integer>
58static std::unordered_set<Integer> MakeSequentialIntegers(int32_t n_values) {
59 std::unordered_set<Integer> values;
60 values.reserve(n_values);
61
62 for (int32_t i = 0; i < n_values; ++i) {
63 values.insert(static_cast<Integer>(i));
64 }
65 DCHECK_EQ(values.size(), static_cast<uint32_t>(n_values));
66 return values;
67}
68
69static std::unordered_set<std::string> MakeDistinctStrings(int32_t n_values) {
70 std::unordered_set<std::string> values;

Callers

nothing calls this directly

Calls 3

reserveMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected