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

Method ComputeSpillEstimate

be/src/runtime/sorter.cc:1057–1070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void Sorter::ComputeSpillEstimate(int64_t estimated_input_size) {
1058 int64_t max_reservation = state_->query_state()->GetMaxReservation();
1059 if (estimated_input_size > max_reservation) {
1060 CheckSortRunBytesLimitEnforcement();
1061 if (enforce_sort_run_bytes_limit_) {
1062 VLOG(3) << Substitute(
1063 "Enforcing sort_run_bytes_limit because spill is estimated to happen: "
1064 "max_reservation=$0 estimated_input_size=$1 sort_run_bytes_limit=$2",
1065 PrettyPrinter::PrintBytes(max_reservation),
1066 PrettyPrinter::PrintBytes(estimated_input_size),
1067 PrettyPrinter::PrintBytes(GetSortRunBytesLimit()));
1068 }
1069 }
1070}
1071
1072Status Sorter::Prepare(ObjectPool* obj_pool) {
1073 DCHECK(in_mem_tuple_sorter_ == nullptr) << "Already prepared";

Callers

nothing calls this directly

Calls 4

SubstituteFunction · 0.85
PrintBytesFunction · 0.85
GetMaxReservationMethod · 0.80
query_stateMethod · 0.45

Tested by

no test coverage detected