icexelloss commented on code in PR #35874:
URL: https://github.com/apache/arrow/pull/35874#discussion_r1214369106
##########
cpp/src/arrow/acero/asof_join_node_test.cc:
##########
@@ -1406,6 +1477,20 @@ void TestBackpressure(BatchesMaker maker, int
num_batches, int batch_size,
total_length += batch->num_rows();
}
ASSERT_EQ(static_cast<int64_t>(num_batches * batch_size), total_length);
+
+ std::unordered_map<bool, BackpressureCounters> counters_by_is_fast;
+ for (size_t i = 0; i < source_configs.size(); i++) {
+ BackpressureCounters& counters =
counters_by_is_fast[source_configs[i].is_fast];
+ counters.pause_count += bp_counters[i].pause_count;
+ counters.resume_count += bp_counters[i].resume_count;
+ }
+ ASSERT_EQ(counters_by_is_fast.size(), 2);
+ ASSERT_GT(counters_by_is_fast[true].pause_count, 0);
+ ASSERT_GT(counters_by_is_fast[true].resume_count, 0);
+ // runs on some slow machines may not see any pause/resume, but if at least
one pause is
+ // seen then at least one resume must also be seen
+ ASSERT_EQ(counters_by_is_fast[false].pause_count > 0,
Review Comment:
I don't think we really need to check the slow sources, because it is
entirely possible that it is not paused at all in the expected behavior (since
it is slower than asof join?)
--
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]