| 329 | |
| 330 | template <> |
| 331 | inline void DataPageBuilder<BooleanType>::AppendValues(const ColumnDescriptor* d, |
| 332 | const std::vector<bool>& values, |
| 333 | Encoding::type encoding) { |
| 334 | if (encoding != Encoding::PLAIN) { |
| 335 | ParquetException::NYI("only plain encoding currently implemented"); |
| 336 | } |
| 337 | |
| 338 | auto encoder = MakeTypedEncoder<BooleanType>(Encoding::PLAIN, false, d); |
| 339 | dynamic_cast<BooleanEncoder*>(encoder.get()) |
| 340 | ->Put(values, static_cast<int>(values.size())); |
| 341 | std::shared_ptr<Buffer> buffer = encoder->FlushValues(); |
| 342 | PARQUET_THROW_NOT_OK(sink_->Write(buffer->data(), buffer->size())); |
| 343 | |
| 344 | num_values_ = std::max(static_cast<int32_t>(values.size()), num_values_); |
| 345 | encoding_ = encoding; |
| 346 | have_values_ = true; |
| 347 | } |
| 348 | |
| 349 | template <typename Type> |
| 350 | static std::shared_ptr<DataPageV1> MakeDataPage( |
no test coverage detected