morningman commented on code in PR #31630: URL: https://github.com/apache/doris/pull/31630#discussion_r1508454232
########## be/src/pipeline/exec/file_scan_operator.cpp: ########## @@ -73,20 +73,51 @@ void FileScanLocalState::set_scan_ranges(RuntimeState* state, _scan_ranges = scan_ranges; } else { // There is no need for the number of scanners to exceed the number of threads in thread pool. - _scan_ranges.clear(); - auto range_iter = scan_ranges.begin(); - for (int i = 0; i < max_scanners && range_iter != scan_ranges.end(); ++i, ++range_iter) { - _scan_ranges.push_back(*range_iter); + _scan_ranges.resize(max_scanners); + std::vector<TScanRangeParams>& scan_ranges_ = + const_cast<std::vector<TScanRangeParams>&>(scan_ranges); Review Comment: Add comment to explain why sort by partition keys -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org