| 76 | } |
| 77 | |
| 78 | Status RunCompressorBuilder::AppendEmptyValues(int64_t length) { |
| 79 | if (ARROW_PREDICT_FALSE(length == 0)) { |
| 80 | return Status::OK(); |
| 81 | } |
| 82 | // Empty values are usually appended as placeholders for future values, so |
| 83 | // we make no attempt at making the empty values appended now part of the |
| 84 | // current run. Each AppendEmptyValues() creates its own run of the given length. |
| 85 | ARROW_RETURN_NOT_OK(FinishCurrentRun()); |
| 86 | { |
| 87 | ARROW_RETURN_NOT_OK(WillCloseRunOfEmptyValues(length)); |
| 88 | ARROW_RETURN_NOT_OK(inner_builder_->AppendEmptyValue()); |
| 89 | UpdateDimensions(); |
| 90 | } |
| 91 | // Current run remains cleared after FinishCurrentRun() as we don't want to |
| 92 | // extend it with empty values potentially coming in the future. |
| 93 | return Status::OK(); |
| 94 | } |
| 95 | |
| 96 | Status RunCompressorBuilder::AppendScalar(const Scalar& scalar, int64_t n_repeats) { |
| 97 | if (ARROW_PREDICT_FALSE(n_repeats == 0)) { |
nothing calls this directly
no test coverage detected