| 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 { |
nothing calls this directly
no test coverage detected