We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1e7830 commit d57a53bCopy full SHA for d57a53b
cpp/src/arrow/util/bpacking_test.cc
@@ -52,7 +52,7 @@ std::vector<uint8_t> GenerateRandomPackedValues(int32_t num_values, int32_t bit_
52
constexpr uint32_t kSeed = 3214;
53
EXPECT_OK_AND_ASSIGN(const auto num_bytes, GetNumBytes(num_values, bit_width));
54
55
- std::vector<uint8_t> out(num_bytes);
+ std::vector<uint8_t> out(std::max(1, num_bytes)); // We need a valid pointer for size 0
56
random_bytes(num_bytes, kSeed, out.data());
57
58
return out;
0 commit comments