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

Method ColumnWriterImpl

cpp/src/parquet/column_writer.cc:744–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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