MCPcopy Create free account
hub / github.com/apache/orc / generateNotNull

Function generateNotNull

c++/test/TestByteRLEEncoder.cc:31–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 const int DEFAULT_MEM_STREAM_SIZE = 1024 * 1024; // 1M
30
31 void generateNotNull(uint64_t numValues, uint64_t numNulls, char* notNull) {
32 if (numNulls != 0 && notNull != nullptr) {
33 memset(notNull, 1, numValues);
34 while (numNulls > 0) {
35 uint64_t pos = static_cast<uint64_t>(std::rand()) % numValues;
36 if (notNull[pos]) {
37 notNull[pos] = static_cast<char>(0);
38 --numNulls;
39 }
40 }
41 }
42 }
43
44 void generateData(uint64_t numValues, char* data, uint64_t numNulls = 0,
45 char* notNull = nullptr) {

Callers 2

generateDataFunction · 0.85
generateBoolDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected