| 1055 | } |
| 1056 | |
| 1057 | void 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 | |
| 1072 | Status Sorter::Prepare(ObjectPool* obj_pool) { |
| 1073 | DCHECK(in_mem_tuple_sorter_ == nullptr) << "Already prepared"; |
nothing calls this directly
no test coverage detected