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

Function decodeAndVerify

c++/test/TestRleEncoder.cc:81–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void decodeAndVerify(RleVersion version, const MemoryOutputStream& memStream, int64_t* data,
82 uint64_t numValues, const char* notNull, bool isSinged) {
83 std::unique_ptr<RleDecoder> decoder = createRleDecoder(
84 std::make_unique<SeekableArrayInputStream>(memStream.getData(), memStream.getLength()),
85 isSinged, version, *getDefaultPool(), getDefaultReaderMetrics());
86
87 std::vector<int64_t> decodedData(numValues);
88 decoder->next(decodedData.data(), numValues, notNull);
89
90 for (uint64_t i = 0; i < numValues; ++i) {
91 if (!notNull || notNull[i]) {
92 EXPECT_EQ(data[i], decodedData[i]);
93 }
94 }
95
96 decoder->next(decodedData.data(), numValues, notNull);
97 for (uint64_t i = 0; i < numValues; ++i) {
98 if (!notNull || notNull[i]) {
99 EXPECT_EQ(data[i], decodedData[i]);
100 }
101 }
102 }
103
104 std::unique_ptr<RleEncoder> RleTest::getEncoder(RleVersion version, MemoryOutputStream& memStream,
105 bool isSigned) {

Callers 2

runTestMethod · 0.70
TEST_PFunction · 0.70

Calls 7

createRleDecoderFunction · 0.85
getDefaultPoolFunction · 0.85
getDefaultReaderMetricsFunction · 0.85
getLengthMethod · 0.65
nextMethod · 0.65
getDataMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected