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

Method Send

be/src/exec/nested-loop-join-builder.cc:186–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186Status NljBuilder::Send(RuntimeState* state, RowBatch* batch) {
187 SCOPED_TIMER(profile()->total_time_counter());
188 int num_input_rows = batch->num_rows();
189 // Swap the contents of the batch into a batch owned by the builder.
190 RowBatch* build_batch = GetNextEmptyBatch();
191 build_batch->AcquireState(batch);
192
193 AddBuildBatch(build_batch);
194 if (is_separate_build_
195 || build_batch->flush_mode() == RowBatch::FlushMode::FLUSH_RESOURCES
196 || build_batch->num_buffers() > 0) {
197 // This batch and earlier batches may refer to resources passed from the child
198 // that aren't owned by the row batch itself. Deep copying ensures that the row
199 // batches are backed by memory owned by this node that is safe to hold on to.
200 //
201 // Acquiring ownership of attached Blocks or Buffers does not correctly update the
202 // accounting, so also copy data in that cases to avoid stealing reservation
203 // from whoever created the Block/Buffer. TODO: remove workaround when IMPALA-4179
204 // is fixed.
205 RETURN_IF_ERROR(DeepCopyBuildBatches(state));
206 }
207 COUNTER_ADD(num_build_rows_, num_input_rows);
208 return Status::OK();
209}
210
211Status NljBuilder::FlushFinal(RuntimeState* state) {
212 SCOPED_TIMER(profile()->total_time_counter());

Callers

nothing calls this directly

Calls 6

OKFunction · 0.85
total_time_counterMethod · 0.80
AcquireStateMethod · 0.80
flush_modeMethod · 0.80
num_buffersMethod · 0.80
num_rowsMethod · 0.45

Tested by

no test coverage detected