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

Method Reset

be/src/exec/topn-node.cc:498–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498Status TopNNode::Reset(RuntimeState* state, RowBatch* row_batch) {
499 if (is_partitioned()) {
500 partition_heaps_.clear();
501 sorter_->Reset();
502 sort_out_batch_.reset();
503 sort_out_batch_pos_ = 0;
504 num_rows_returned_from_partition_ = 0;
505 } else {
506 heap_->Reset();
507 }
508 tmp_tuple_ = nullptr;
509 num_rows_skipped_ = 0;
510 // Transfer ownership of tuple data to output batch.
511 row_batch->tuple_data_pool()->AcquireData(tuple_pool_.get(), false);
512 // We deliberately do not free the tuple_pool_ here to allow selective transferring
513 // of resources in the future.
514 return ExecNode::Reset(state, row_batch);
515}
516
517void TopNNode::Close(RuntimeState* state) {
518 if (is_closed()) return;

Callers 13

OpenMethod · 0.45
GetNextPartitionedMethod · 0.45
EvictPartitionsMethod · 0.45
ProcessBuildBatchMethod · 0.45
InsertBatchMethod · 0.45
ResetForProbeMethod · 0.45
CloseMethod · 0.45
GetNextMethod · 0.45
OpenMethod · 0.45

Calls 6

AcquireDataMethod · 0.80
tuple_data_poolMethod · 0.80
clearMethod · 0.65
resetMethod · 0.65
getMethod · 0.65
ClearMethod · 0.45

Tested by

no test coverage detected