| 187 | } |
| 188 | |
| 189 | std::pair<int32_t, int32_t> numTaskSpillFiles(const exec::Task& task) { |
| 190 | int32_t numBuildFiles = 0; |
| 191 | int32_t numProbeFiles = 0; |
| 192 | for (auto& pipelineStat : task.taskStats().pipelineStats) { |
| 193 | for (auto& operatorStat : pipelineStat.operatorStats) { |
| 194 | if (operatorStat.runtimeStats.count("spillFileSize") == 0) { |
| 195 | continue; |
| 196 | } |
| 197 | if (operatorStat.operatorType == "HashBuild") { |
| 198 | numBuildFiles += operatorStat.runtimeStats["spillFileSize"].count; |
| 199 | continue; |
| 200 | } |
| 201 | if (operatorStat.operatorType == "HashProbe") { |
| 202 | numProbeFiles += operatorStat.runtimeStats["spillFileSize"].count; |
| 203 | } |
| 204 | } |
| 205 | } |
| 206 | return {numBuildFiles, numProbeFiles}; |
| 207 | } |
| 208 | |
| 209 | void abortPool(memory::MemoryPool* pool) { |
| 210 | try { |