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

Function vectorDecodeAndVerify

c++/test/TestRleVectorDecoder.cc:53–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 };
52
53 void vectorDecodeAndVerify(RleVersion version, const MemoryOutputStream& memStream, int64_t* data,
54 uint64_t numValues, const char* notNull, uint64_t blockSize,
55 bool isSinged) {
56 std::unique_ptr<RleDecoder> decoder =
57 createRleDecoder(std::unique_ptr<SeekableArrayInputStream>(new SeekableArrayInputStream(
58 memStream.getData(), memStream.getLength(), blockSize)),
59 isSinged, version, *getDefaultPool(), getDefaultReaderMetrics());
60
61 int64_t* decodedData = new int64_t[numValues];
62 decoder->next(decodedData, numValues, notNull);
63
64 for (uint64_t i = 0; i < numValues; ++i) {
65 if (!notNull || notNull[i]) {
66 EXPECT_EQ(data[i], decodedData[i]);
67 }
68 }
69
70 delete[] decodedData;
71 }
72
73 void RleV2BitUnpackAvx512Test::SetUp() {
74 alignBitpacking = GetParam();

Callers 1

runTestMethod · 0.85

Calls 6

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

Tested by

no test coverage detected