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

Method DoAppend

cpp/src/arrow/compute/kernels/vector_hash.cc:303–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301
302 template <bool HasError = with_error_status>
303 enable_if_t<!HasError, Status> DoAppend(const ArraySpan& arr) {
304 return VisitArraySpanInline<Type>(
305 arr,
306 [this](Scalar v) {
307 auto on_found = [this](int32_t memo_index) {
308 action_.ObserveFound(memo_index);
309 };
310 auto on_not_found = [this](int32_t memo_index) {
311 action_.ObserveNotFound(memo_index);
312 };
313
314 int32_t unused_memo_index;
315 return memo_table_->GetOrInsert(v, std::move(on_found), std::move(on_not_found),
316 &unused_memo_index);
317 },
318 [this]() {
319 if (action_.ShouldEncodeNulls()) {
320 auto on_found = [this](int32_t memo_index) {
321 action_.ObserveNullFound(memo_index);
322 };
323 auto on_not_found = [this](int32_t memo_index) {
324 action_.ObserveNullNotFound(memo_index);
325 };
326 memo_table_->GetOrInsertNull(std::move(on_found), std::move(on_not_found));
327 } else {
328 action_.ObserveNullNotFound(-1);
329 }
330 return Status::OK();
331 });
332 }
333
334 template <bool HasError = with_error_status>
335 enable_if_t<HasError, Status> DoAppend(const ArraySpan& arr) {

Callers

nothing calls this directly

Calls 8

OKFunction · 0.50
ObserveFoundMethod · 0.45
ObserveNotFoundMethod · 0.45
GetOrInsertMethod · 0.45
ShouldEncodeNullsMethod · 0.45
ObserveNullFoundMethod · 0.45
ObserveNullNotFoundMethod · 0.45
GetOrInsertNullMethod · 0.45

Tested by

no test coverage detected