You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "rtpsw (via GitHub)" <gi...@apache.org> on 2023/07/10 19:41:40 UTC

[GitHub] [arrow] rtpsw commented on a diff in pull request #36580: GH-36482: [C++][CI] Fix sporadic test failures in AsofJoinBasicTest

rtpsw commented on code in PR #36580:
URL: https://github.com/apache/arrow/pull/36580#discussion_r1258813028


##########
cpp/src/arrow/acero/asof_join_node.cc:
##########
@@ -812,15 +826,15 @@ class InputState {
       }
       latest_time_ = next_time;
       // If we have an active batch
-      if (++latest_ref_row_ >= (row_index_t)queue_.UnsyncFront()->num_rows()) {
+      if (++latest_ref_row_ >= (row_index_t)queue_.UnsyncFront().batch->num_rows()) {
         // 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();
         if (have_active_batch) {
-          DCHECK_GT(queue_.UnsyncFront()->num_rows(), 0);  // empty batches disallowed
-          key_hasher_->Invalidate();  // batch changed - invalidate key hasher's cache
-          memo_.UpdateTime(GetTime(queue_.UnsyncFront().get(), 0));  // time changed
+          DCHECK_GT(queue_.UnsyncFront().batch->num_rows(),
+                    0);  // empty batches disallowed
+          memo_.UpdateTime(GetTime(queue_.UnsyncFront().batch.get(), 0));  // time changed

Review Comment:
   Yes, because only the processing thread, which runs this code, is popping from the (front of the) queue.



-- 
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-unsubscribe@arrow.apache.org

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