lidavidm commented on a change in pull request #11017:
URL: https://github.com/apache/arrow/pull/11017#discussion_r723601470
##########
File path: cpp/src/arrow/compute/exec/plan_test.cc
##########
@@ -374,6 +374,108 @@ TEST(ExecPlanExecution, SourceSinkError) {
Finishes(Raises(StatusCode::Invalid, HasSubstr("Artificial"))));
}
+TEST(ExecPlanExecution, SourceConsumingSink) {
+ for (bool slow : {false, true}) {
+ SCOPED_TRACE(slow ? "slowed" : "unslowed");
+
+ for (bool parallel : {false, true}) {
+ SCOPED_TRACE(parallel ? "parallel" : "single threaded");
+ ASSERT_OK_AND_ASSIGN(auto plan, ExecPlan::Make());
+ uint32_t batches_seen = 0;
+ Future<> finish = Future<>::Make();
+ struct TestConsumer : public SinkNodeConsumer {
+ TestConsumer(uint32_t* batches_seen, Future<> finish)
Review comment:
In the parallel case, shouldn't this be an atomic?
##########
File path: cpp/src/arrow/compute/exec/plan_test.cc
##########
@@ -374,6 +374,108 @@ TEST(ExecPlanExecution, SourceSinkError) {
Finishes(Raises(StatusCode::Invalid, HasSubstr("Artificial"))));
}
+TEST(ExecPlanExecution, SourceConsumingSink) {
+ for (bool slow : {false, true}) {
+ SCOPED_TRACE(slow ? "slowed" : "unslowed");
+
+ for (bool parallel : {false, true}) {
+ SCOPED_TRACE(parallel ? "parallel" : "single threaded");
+ ASSERT_OK_AND_ASSIGN(auto plan, ExecPlan::Make());
+ uint32_t batches_seen = 0;
+ Future<> finish = Future<>::Make();
+ struct TestConsumer : public SinkNodeConsumer {
+ TestConsumer(uint32_t* batches_seen, Future<> finish)
Review comment:
(I suppose with only 2 batches, it's unlikely to run into this, but…)
--
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]