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

Method InsertBatchUnpartitioned

be/src/exec/topn-node-ir.cc:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25using namespace impala;
26
27void TopNNode::InsertBatchUnpartitioned(RuntimeState* state, RowBatch* batch) {
28 DCHECK(!is_partitioned());
29 // TODO: after inlining the comparator calls with codegen - IMPALA-4065 - we could
30 // probably squeeze more performance out of this loop by ensure that as many loads
31 // are hoisted out of the loop as possible (either via code changes or __restrict__)
32 // annotations.
33 FOREACH_ROW(batch, 0, iter) {
34 int num_to_reclaim = heap_->InsertTupleRow(this, iter.Get());
35 // Using a branch here instead of adding the value directly improves
36 // top-n performance by a couple of %.
37 if (num_to_reclaim != 0) rows_to_reclaim_ += num_to_reclaim;
38 }
39}
40
41int TopNNode::Heap::InsertTupleRow(TopNNode* node, TupleRow* input_row) {
42 const TupleDescriptor& tuple_desc = *node->output_tuple_desc_;

Callers

nothing calls this directly

Calls 3

FOREACH_ROWFunction · 0.85
InsertTupleRowMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected