MCPcopy Create free account
hub / github.com/apache/impala / ProcessBuildBatch

Method ProcessBuildBatch

be/src/exec/iceberg-delete-builder.cc:332–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332Status IcebergDeleteBuilder::ProcessBuildBatch(RuntimeState* state,
333 RowBatch* build_batch) {
334 if (UNLIKELY(build_batch->num_rows() == 0)) return Status::OK();
335
336 TupleRow* first_row = build_batch->GetRow(0);
337 impala::StringValue* file_path =
338 first_row->GetTuple(0)->GetStringSlot(file_path_offset_);
339 uint64_t pos = *first_row->GetTuple(0)->GetBigIntSlot(pos_offset_);
340
341 StringValue prev_file_path(*file_path);
342 vector<uint64_t> pos_buffer;
343 pos_buffer.reserve(128);
344 pos_buffer.push_back(pos);
345
346 FOREACH_ROW(build_batch, 1, build_batch_iter) {
347 TupleRow* build_row = build_batch_iter.Get();
348
349 file_path = build_row->GetTuple(0)->GetStringSlot(file_path_offset_);
350 pos = *build_row->GetTuple(0)->GetBigIntSlot(pos_offset_);
351
352 if (file_path->Ptr() == prev_file_path.Ptr() || *file_path == prev_file_path) {
353 pos_buffer.push_back(pos);
354 } else {
355 RETURN_IF_ERROR(AddToDeletedRows(prev_file_path, pos_buffer));
356 pos_buffer.clear();
357 pos_buffer.push_back(pos);
358 prev_file_path.Assign(*file_path);
359 }
360 }
361 RETURN_IF_ERROR(AddToDeletedRows(prev_file_path, pos_buffer));
362
363 return Status::OK();
364}

Callers

nothing calls this directly

Calls 13

OKFunction · 0.85
FOREACH_ROWFunction · 0.85
GetStringSlotMethod · 0.80
GetBigIntSlotMethod · 0.80
reserveMethod · 0.80
push_backMethod · 0.80
clearMethod · 0.65
num_rowsMethod · 0.45
GetRowMethod · 0.45
GetTupleMethod · 0.45
GetMethod · 0.45
PtrMethod · 0.45

Tested by

no test coverage detected