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

Method AppendNulls

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

Source from the content-addressed store, hash-verified

53}
54
55Status RunCompressorBuilder::AppendNulls(int64_t length) {
56 if (ARROW_PREDICT_FALSE(length == 0)) {
57 return Status::OK();
58 }
59 if (ARROW_PREDICT_FALSE(current_run_length_ == 0)) {
60 // Open a new NULL run
61 DCHECK_EQ(current_value_, NULLPTR);
62 current_run_length_ = length;
63 } else if (current_value_ == NULLPTR) {
64 // Extend the currently open NULL run
65 current_run_length_ += length;
66 } else {
67 // Close then non-NULL run
68 ARROW_RETURN_NOT_OK(WillCloseRun(current_value_, current_run_length_));
69 ARROW_RETURN_NOT_OK(inner_builder_->AppendScalar(*current_value_));
70 UpdateDimensions();
71 // Open a new NULL run
72 current_value_.reset();
73 current_run_length_ = length;
74 }
75 return Status::OK();
76}
77
78Status RunCompressorBuilder::AppendEmptyValues(int64_t length) {
79 if (ARROW_PREDICT_FALSE(length == 0)) {

Callers

nothing calls this directly

Calls 4

open_run_lengthMethod · 0.80
OKFunction · 0.50
AppendScalarMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected