| 136 | } |
| 137 | |
| 138 | Status RunCompressorBuilder::FinishCurrentRun() { |
| 139 | if (current_run_length_ > 0) { |
| 140 | // Close the current run |
| 141 | ARROW_RETURN_NOT_OK(WillCloseRun(current_value_, current_run_length_)); |
| 142 | ARROW_RETURN_NOT_OK(current_value_ ? inner_builder_->AppendScalar(*current_value_) |
| 143 | : inner_builder_->AppendNull()); |
| 144 | UpdateDimensions(); |
| 145 | // Clear the current run |
| 146 | current_value_.reset(); |
| 147 | current_run_length_ = 0; |
| 148 | } |
| 149 | return Status::OK(); |
| 150 | } |
| 151 | |
| 152 | Status RunCompressorBuilder::FinishInternal(std::shared_ptr<ArrayData>* out) { |
| 153 | ARROW_RETURN_NOT_OK(FinishCurrentRun()); |
no test coverage detected