FelixYBW commented on code in PR #6934:
URL: https://github.com/apache/incubator-gluten/pull/6934#discussion_r1724303872
##########
cpp/velox/compute/WholeStageResultIterator.cc:
##########
@@ -195,7 +195,22 @@ std::shared_ptr<ColumnarBatch>
WholeStageResultIterator::next() {
if (task_->isFinished()) {
return nullptr;
}
- velox::RowVectorPtr vector = task_->next();
+ velox::RowVectorPtr vector;
+ while (true) {
+ auto future = velox::ContinueFuture::makeEmpty();
+ auto out = task_->next(&future);
+ if (!future.valid()) {
+ // Not need to wait. Break.
+ vector = std::move(out);
+ break;
+ }
+ // Velox suggested to wait. This might be because another thread (e.g.,
background io thread) is spilling the task.
+ GLUTEN_CHECK(out == nullptr, "Expected to wait but still got non-null
output from Velox task");
+ VLOG(2) << "Velox task " << task_->taskId()
Review Comment:
Can we use Gluten's LOG(INFO) etc. here? Looks VLOG is used several other
places in Gluten. We may always use LOG
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]