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

Method ClosePartitions

be/src/exec/grouping-aggregator.cc:1035–1054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033}
1034
1035void GroupingAggregator::ClosePartitions() {
1036 // Iterate through the remaining rows in the hash table and call Serialize/Finalize on
1037 // them in order to free any memory allocated by UDAs
1038 if (output_partition_ != nullptr) {
1039 CleanupHashTbl(output_partition_->agg_fn_evals, output_iterator_);
1040 output_partition_->Close(false);
1041 output_partition_ = nullptr;
1042 output_iterator_.SetAtEnd();
1043 }
1044 for (Partition* partition : hash_partitions_) {
1045 if (partition != nullptr) partition->Close(true);
1046 }
1047 hash_partitions_.clear();
1048 for (Partition* partition : aggregated_partitions_) partition->Close(true);
1049 aggregated_partitions_.clear();
1050 for (Partition* partition : spilled_partitions_) partition->Close(true);
1051 spilled_partitions_.clear();
1052 memset(hash_tbls_, 0, sizeof(hash_tbls_));
1053 partition_pool_->Clear();
1054}
1055
1056int64_t GroupingAggregator::MinReservation() const {
1057 // Must be kept in sync with AggregationNode.computeNodeResourceProfile() in fe.

Callers

nothing calls this directly

Calls 4

SetAtEndMethod · 0.80
clearMethod · 0.65
CloseMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected