MCPcopy Create free account
hub / github.com/apache/arrow / CheckRoundtrip

Method CheckRoundtrip

cpp/src/parquet/encoding_test.cc:2045–2060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2043 static constexpr int TYPE = Type::BOOLEAN;
2044
2045 virtual void CheckRoundtrip() {
2046 auto encoder = MakeTypedEncoder<BooleanType>(Encoding::RLE,
2047 /*use_dictionary=*/false, descr_.get());
2048 auto decoder = MakeTypedDecoder<BooleanType>(Encoding::RLE, descr_.get());
2049
2050 for (int i = 0; i < 3; ++i) {
2051 encoder->Put(draws_, num_values_);
2052 encode_buffer_ = encoder->FlushValues();
2053
2054 decoder->SetData(num_values_, encode_buffer_->data(),
2055 static_cast<int>(encode_buffer_->size()));
2056 int values_decoded = decoder->Decode(decode_buf_, num_values_);
2057 ASSERT_EQ(num_values_, values_decoded);
2058 ASSERT_NO_FATAL_FAILURE(VerifyResults<c_type>(decode_buf_, draws_, num_values_));
2059 }
2060 }
2061
2062 void CheckRoundtripSpaced(const uint8_t* valid_bits, int64_t valid_bits_offset) {
2063 auto encoder = MakeTypedEncoder<BooleanType>(Encoding::RLE,

Callers

nothing calls this directly

Calls 7

getMethod · 0.45
PutMethod · 0.45
FlushValuesMethod · 0.45
SetDataMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
DecodeMethod · 0.45

Tested by

no test coverage detected