zanmato1984 commented on code in PR #46300:
URL: https://github.com/apache/arrow/pull/46300#discussion_r2076509438


##########
cpp/src/arrow/acero/asof_join_node.cc:
##########
@@ -639,12 +639,8 @@ class InputState : public 
util::SerialSequencingQueue::Processor {
         // hit the end of the batch, need to get the next batch if possible.
         ++batches_processed_;
         latest_ref_row_ = 0;
-        have_active_batch &= !queue_.TryPop();

Review Comment:
   IMO this code is apparently NOT doing what it is supposed to do: by here the 
`have_active_batch` must be `true`, meaning `queue_` must be non-empty. Then 
popping the queue always gets a valid `std::optional` and effectively setting 
`have_active_batch` to false. The `if` branch below won't be executed.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to