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

Method FlushValues

cpp/src/parquet/encoder.cc:585–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583 }
584
585 std::shared_ptr<Buffer> FlushValues() override {
586 const int64_t buffer_size = EstimatedDataEncodedSize();
587 if (buffer_size > std::numeric_limits<int>::max()) {
588 std::stringstream ss;
589 ss << "Buffer size for DictEncoder (" << buffer_size
590 << ") exceeds maximum int value";
591 throw ParquetException(ss.str());
592 }
593 std::shared_ptr<ResizableBuffer> buffer = AllocateBuffer(this->pool_, buffer_size);
594 int result_size = WriteIndices(buffer->mutable_data(), static_cast<int>(buffer_size));
595 PARQUET_THROW_NOT_OK(buffer->Resize(result_size, false));
596 return buffer;
597 }
598
599 /// Writes out the encoded dictionary to buffer. buffer must be preallocated to
600 /// dict_encoded_size() bytes.

Callers

nothing calls this directly

Calls 5

ParquetExceptionFunction · 0.85
strMethod · 0.80
AllocateBufferFunction · 0.70
mutable_dataMethod · 0.45
ResizeMethod · 0.45

Tested by

no test coverage detected