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

Method ColumnWriterImpl

cpp/src/parquet/column_writer.cc:745–784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

743class 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 : metadata_(metadata),
749 descr_(metadata->descr()),
750 level_info_(internal::LevelInfo::ComputeLevelInfo(metadata->descr())),
751 pager_(std::move(pager)),
752 has_dictionary_(use_dictionary),
753 encoding_(encoding),
754 properties_(properties),
755 allocator_(properties->memory_pool()),
756 num_buffered_values_(0),
757 num_buffered_encoded_values_(0),
758 num_buffered_nulls_(0),
759 num_buffered_rows_(0),
760 rows_written_(0),
761 total_bytes_written_(0),
762 total_compressed_bytes_(0),
763 closed_(false),
764 fallback_(false),
765 definition_levels_sink_(allocator_),
766 repetition_levels_sink_(allocator_) {
767 definition_levels_rle_ =
768 std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0));
769 repetition_levels_rle_ =
770 std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0));
771 uncompressed_data_ =
772 std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0));
773
774 if (pager_->has_compressor()) {
775 compressor_temp_buffer_ =
776 std::static_pointer_cast<ResizableBuffer>(AllocateBuffer(allocator_, 0));
777 }
778 if (properties_->content_defined_chunking_enabled()) {
779 auto cdc_options = properties_->content_defined_chunking_options();
780 content_defined_chunker_.emplace(level_info_, cdc_options.min_chunk_size,
781 cdc_options.max_chunk_size,
782 cdc_options.norm_level);
783 }
784 }
785
786 virtual ~ColumnWriterImpl() = default;
787

Callers

nothing calls this directly

Calls 5

ComputeLevelInfoFunction · 0.70
AllocateBufferFunction · 0.70
descrMethod · 0.45
memory_poolMethod · 0.45
has_compressorMethod · 0.45

Tested by

no test coverage detected