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

Method CheckAndResize

be/src/exec/hash-table.cc:557–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

555}
556
557Status HashTable::CheckAndResize(
558 uint64_t buckets_to_fill, HashTableCtx* __restrict__ ht_ctx, bool* got_memory) {
559 uint64_t shift = 0;
560 while (num_filled_buckets_ + buckets_to_fill >
561 (num_buckets_ << shift) * MAX_FILL_FACTOR) {
562 ++shift;
563 }
564 if (shift > 0) return ResizeBuckets(num_buckets_ << shift, ht_ctx, got_memory);
565 *got_memory = true;
566 return Status::OK();
567}
568
569Status HashTable::ResizeBuckets(
570 int64_t num_buckets, HashTableCtx* __restrict__ ht_ctx, bool* got_memory) {

Callers 5

BasicTestMethod · 0.80
ScanTestMethod · 0.80
GrowTableTestMethod · 0.80
AddBatchStreamingMethod · 0.80

Calls 1

OKFunction · 0.85

Tested by 3

BasicTestMethod · 0.64
ScanTestMethod · 0.64
GrowTableTestMethod · 0.64