| 743 | class ColumnWriterImpl { |
| 744 | public: |
| 745 | ColumnWriterImpl(ColumnChunkMetaDataBuilder* metadata, |
| 746 | std::unique_ptr<PageWriter> pager, const bool use_dictionary, |
| 747 | Encoding::type encoding, const WriterProperties* properties, |
| 748 | internal::ContentDefinedChunker* content_defined_chunker) |
| 749 | : metadata_(metadata), |
| 750 | descr_(metadata->descr()), |
| 751 | level_info_(internal::LevelInfo::ComputeLevelInfo(metadata->descr())), |
| 752 | pager_(std::move(pager)), |
| 753 | has_dictionary_(use_dictionary), |
| 754 | encoding_(encoding), |
| 755 | properties_(properties), |
| 756 | allocator_(properties->memory_pool()), |
| 757 | num_buffered_values_(0), |
| 758 | num_buffered_encoded_values_(0), |
| 759 | num_buffered_nulls_(0), |
| 760 | num_buffered_rows_(0), |
| 761 | rows_written_(0), |
| 762 | total_bytes_written_(0), |
| 763 | total_compressed_bytes_(0), |
| 764 | closed_(false), |
| 765 | fallback_(false), |
| 766 | definition_levels_sink_(allocator_), |
| 767 | repetition_levels_sink_(allocator_), |
| 768 | content_defined_chunker_(content_defined_chunker) { |
| 769 | definition_levels_rle_ = |
| 770 | std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0)); |
| 771 | repetition_levels_rle_ = |
| 772 | std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0)); |
| 773 | uncompressed_data_ = |
| 774 | std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0)); |
| 775 | |
| 776 | if (pager_->has_compressor()) { |
| 777 | compressor_temp_buffer_ = |
| 778 | std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0)); |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | virtual ~ColumnWriterImpl() = default; |
| 783 |
nothing calls this directly
no test coverage detected