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

Function decodeAndVerify

c++/test/TestByteRLEEncoder.cc:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 void decodeAndVerify(const MemoryOutputStream& memStream, char* data, uint64_t numValues,
61 char* notNull) {
62 auto inStream =
63 std::make_unique<SeekableArrayInputStream>(memStream.getData(), memStream.getLength());
64
65 std::unique_ptr<ByteRleDecoder> decoder =
66 createByteRleDecoder(std::move(inStream), getDefaultReaderMetrics());
67
68 char* decodedData = new char[numValues];
69 decoder->next(decodedData, numValues, notNull);
70
71 for (uint64_t i = 0; i < numValues; ++i) {
72 if (!notNull || notNull[i]) {
73 EXPECT_EQ(data[i], decodedData[i]);
74 }
75 }
76
77 delete[] decodedData;
78 }
79
80 void decodeAndVerifyBoolean(const MemoryOutputStream& memStream, char* data, uint64_t numValues,
81 char* notNull) {

Callers 1

TESTFunction · 0.70

Calls 5

createByteRleDecoderFunction · 0.85
getDefaultReaderMetricsFunction · 0.85
getLengthMethod · 0.65
nextMethod · 0.65
getDataMethod · 0.45

Tested by

no test coverage detected