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

Method FinishCurrentRun

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

Source from the content-addressed store, hash-verified

136}
137
138Status 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
152Status RunCompressorBuilder::FinishInternal(std::shared_ptr<ArrayData>* out) {
153 ARROW_RETURN_NOT_OK(FinishCurrentRun());

Callers 1

AppendArraySliceMethod · 0.80

Calls 4

OKFunction · 0.50
AppendScalarMethod · 0.45
AppendNullMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected