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

Method AppendEmptyValues

cpp/src/arrow/array/builder_run_end.cc:78–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78Status 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
96Status RunCompressorBuilder::AppendScalar(const Scalar& scalar, int64_t n_repeats) {
97 if (ARROW_PREDICT_FALSE(n_repeats == 0)) {

Callers

nothing calls this directly

Calls 3

open_run_lengthMethod · 0.80
OKFunction · 0.50
AppendEmptyValueMethod · 0.45

Tested by

no test coverage detected