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

Method FlushValues

cpp/src/parquet/encoder.cc:871–887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869 int64_t EstimatedDataEncodedSize() override { return sink_.length(); }
870
871 std::shared_ptr<Buffer> FlushValues() override {
872 if (byte_width_ == 1) {
873 // Special-cased fast path
874 PARQUET_ASSIGN_OR_THROW(auto buf, sink_.Finish());
875 return buf;
876 }
877 auto output_buffer = AllocateBuffer(this->memory_pool(), EstimatedDataEncodedSize());
878 if (num_values_in_buffer_ > 0) {
879 uint8_t* output_buffer_raw = output_buffer->mutable_data();
880 const uint8_t* raw_values = sink_.data();
881 ::arrow::util::internal::ByteStreamSplitEncode(
882 raw_values, /*width=*/byte_width_, num_values_in_buffer_, output_buffer_raw);
883 }
884 sink_.Reset();
885 num_values_in_buffer_ = 0;
886 return output_buffer;
887 }
888
889 void PutSpaced(const T* src, int num_values, const uint8_t* valid_bits,
890 int64_t valid_bits_offset) override {

Callers

nothing calls this directly

Calls 6

ByteStreamSplitEncodeFunction · 0.85
AllocateBufferFunction · 0.70
memory_poolMethod · 0.45
mutable_dataMethod · 0.45
dataMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected