uchenily commented on code in PR #45918:
URL: https://github.com/apache/arrow/pull/45918#discussion_r2013241256
##########
cpp/src/arrow/acero/swiss_join.cc:
##########
@@ -2414,12 +2438,20 @@ Status JoinProbeProcessor::OnFinished() {
// Flush all instances of materialize that have non-zero accumulated output
// rows.
//
- for (size_t i = 0; i < materialize_.size(); ++i) {
- JoinResultMaterialize& materialize = *materialize_[i];
- RETURN_NOT_OK(materialize.Flush(
- [&](ExecBatch batch) { return output_batch_fn_(i, std::move(batch));
}));
+ if (!is_parallel_) {
Review Comment:
The original code path is retained because if flush taskgroup is enabled but
is_parallel is not satisfied (e.g., when num_workers=1), the single worker
thread could get blocked at cv_.wait() due to a full thread pool, it will block
the entire flush operation.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]