From 64ff7f4db02d9ff863171f1e0a235811921f6aeb Mon Sep 17 00:00:00 2001 From: vibhatha Date: Thu, 12 Jan 2023 16:05:01 +0530 Subject: [PATCH] fix(self-review): s1 --- cpp/src/arrow/compute/exec/plan_test.cc | 45 +++++++++++-------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/cpp/src/arrow/compute/exec/plan_test.cc b/cpp/src/arrow/compute/exec/plan_test.cc index b4c5caabc540f..4f68dfff512d0 100644 --- a/cpp/src/arrow/compute/exec/plan_test.cc +++ b/cpp/src/arrow/compute/exec/plan_test.cc @@ -249,18 +249,15 @@ TEST(ExecPlanExecution, UseSinkAfterExecution) { } TEST(ExecPlanExecution, TableSourceSink) { - for (bool parallel : {false, true}) { - SCOPED_TRACE(parallel ? "parallel" : "single threaded"); - for (int batch_size : {1, 4}) { - auto exp_batches = MakeBasicBatches(); - ASSERT_OK_AND_ASSIGN(auto table, - TableFromExecBatches(exp_batches.schema, exp_batches.batches)); - Declaration plan("table_source", TableSourceNodeOptions{table, batch_size}); - - ASSERT_OK_AND_ASSIGN(auto result_table, - DeclarationToTable(std::move(plan), parallel)); - AssertTablesEqualIgnoringOrder(table, result_table); - } + for (int batch_size : {1, 4}) { + auto exp_batches = MakeBasicBatches(); + ASSERT_OK_AND_ASSIGN(auto table, + TableFromExecBatches(exp_batches.schema, exp_batches.batches)); + Declaration plan("table_source", TableSourceNodeOptions{table, batch_size}); + + ASSERT_OK_AND_ASSIGN(auto result_table, + DeclarationToTable(std::move(plan), /*use_threads=*/false)); + AssertTablesEqualIgnoringOrder(table, result_table); } } @@ -308,20 +305,16 @@ void TestSourceSink( std::string source_factory_name, std::function>(const BatchesWithSchema&)> to_elements) { - for (bool parallel : {false, true}) { - SCOPED_TRACE(parallel ? "parallel" : "single threaded"); - auto exp_batches = MakeBasicBatches(); - ASSERT_OK_AND_ASSIGN(auto elements, to_elements(exp_batches)); - auto element_it_maker = [&elements]() { - return MakeVectorIterator(elements); - }; - Declaration plan(source_factory_name, - OptionsType{exp_batches.schema, element_it_maker}); - ASSERT_OK_AND_ASSIGN(auto result, - DeclarationToExecBatches(std::move(plan), parallel)); - AssertExecBatchesEqualIgnoringOrder(result.schema, result.batches, - exp_batches.batches); - } + auto exp_batches = MakeBasicBatches(); + ASSERT_OK_AND_ASSIGN(auto elements, to_elements(exp_batches)); + auto element_it_maker = [&elements]() { + return MakeVectorIterator(elements); + }; + Declaration plan(source_factory_name, + OptionsType{exp_batches.schema, element_it_maker}); + ASSERT_OK_AND_ASSIGN(auto result, + DeclarationToExecBatches(std::move(plan), /*use_threads=*/false)); + AssertExecBatchesEqualIgnoringOrder(result.schema, result.batches, exp_batches.batches); } TEST(ExecPlanExecution, ArrayVectorSourceSink) {