| 988 | } |
| 989 | |
| 990 | void Rle(int seed) { |
| 991 | if (!std::is_same<ParquetType, BooleanType>::value) { |
| 992 | return; |
| 993 | } |
| 994 | auto values = GetValues(seed); |
| 995 | auto encoder = MakeTypedEncoder<ParquetType>(Encoding::RLE, /*use_dictionary=*/false, |
| 996 | column_descr()); |
| 997 | auto decoder = MakeTypedDecoder<ParquetType>(Encoding::RLE, column_descr()); |
| 998 | |
| 999 | ASSERT_NO_THROW(encoder->Put(*values)); |
| 1000 | auto buf = encoder->FlushValues(); |
| 1001 | |
| 1002 | int num_values = static_cast<int>(values->length() - values->null_count()); |
| 1003 | decoder->SetData(num_values, buf->data(), static_cast<int>(buf->size())); |
| 1004 | |
| 1005 | BuilderType acc(arrow_type(), ::arrow::default_memory_pool()); |
| 1006 | ASSERT_EQ(num_values, |
| 1007 | decoder->DecodeArrow(static_cast<int>(values->length()), |
| 1008 | static_cast<int>(values->null_count()), |
| 1009 | values->null_bitmap_data(), values->offset(), &acc)); |
| 1010 | |
| 1011 | std::shared_ptr<::arrow::Array> result; |
| 1012 | ASSERT_OK(acc.Finish(&result)); |
| 1013 | ASSERT_OK(result->ValidateFull()); |
| 1014 | ASSERT_EQ(50, result->length()); |
| 1015 | ::arrow::AssertArraysEqual(*values, *result); |
| 1016 | } |
| 1017 | |
| 1018 | void DeltaBitPack(int seed) { |
| 1019 | if (!std::is_same<ParquetType, Int32Type>::value && |
no test coverage detected