Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaRise committed Jul 12, 2022
1 parent 0e1b5a8 commit 0af0d91
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
4 changes: 2 additions & 2 deletions dbms/src/Flash/Planner/Planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@ BlockInputStreams Planner::execute()
bool Planner::isSupported(const DAGQueryBlock & query_block)
{
/// todo support fine grained shuffle
static auto disableFineGrainedShuffle = [](const DAGQueryBlock & query_block) {
static auto disable_fine_frained_shuffle = [](const DAGQueryBlock & query_block) {
return !enableFineGrainedShuffle(query_block.source->fine_grained_shuffle_stream_count())
&& (!query_block.exchange_sender || !enableFineGrainedShuffle(query_block.exchange_sender->fine_grained_shuffle_stream_count()));
};
return query_block.source
&& (query_block.source->tp() == tipb::ExecType::TypeProjection
|| query_block.source->tp() == tipb::ExecType::TypeExchangeReceiver)
&& disableFineGrainedShuffle(query_block);
&& disable_fine_frained_shuffle(query_block);
}

DAGContext & Planner::dagContext() const
Expand Down
50 changes: 27 additions & 23 deletions dbms/src/Flash/tests/gtest_planner_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ Union: <for test>
Union: <for test>
Expression x 10: <final projection>
Expression: <projection>
SharedQuery: <restore concurrency>
Expression: <final projection>
Expression: <final projection>
SharedQuery: <restore concurrency>
MergeSorting, limit = 10
Union: <for partial order>
PartialSorting x 10: limit = 10
Expand All @@ -453,17 +453,18 @@ Union: <for test>
Expression x 10: <final projection>
Expression: <projection>
Expression: <final projection>
SharedQuery: <restore concurrency>
ParallelAggregating, max_threads: 10, final: true
Expression x 10: <projection>
SharedQuery: <restore concurrency>
Expression: <cast after aggregation>
SharedQuery: <restore concurrency>
ParallelAggregating, max_threads: 10, final: true
Expression x 10: <projection>
Expression: <final projection>
MergeSorting, limit = 10
Union: <for partial order>
PartialSorting x 10: limit = 10
Expression: <projection>
Expression: <final projection>
MockTableScan)";
SharedQuery: <restore concurrency>
MergeSorting, limit = 10
Union: <for partial order>
PartialSorting x 10: limit = 10
Expression: <projection>
Expression: <final projection>
MockTableScan)";
ASSERT_BLOCKINPUTSTREAM_EQAUL(expected, request, 10);
}

Expand All @@ -480,22 +481,22 @@ Union: <for test>
{
String expected = R"(
Union: <for test>
SharedQuery x 10: <restore concurrency>
Limit, limit = 10
Union: <for partial limit>
Limit x 10, limit = 10
Expression: <final projection>
Expression x 10: <final projection>
SharedQuery: <restore concurrency>
Limit, limit = 10
Union: <for partial limit>
Limit x 10, limit = 10
Expression: <projection>
Expression: <final projection>
Expression: <before order and select>
Filter: <execute where>
Expression: <projection>
Expression: <final projection>
Filter
Expression: <projection>
Expression: <final projection>
Expression: <cast after aggregation>
SharedQuery: <restore concurrency>
ParallelAggregating, max_threads: 10, final: true
Expression x 10: <projection>
SharedQuery: <restore concurrency>
Expression: <final projection>
Expression: <final projection>
SharedQuery: <restore concurrency>
MergeSorting, limit = 10
Union: <for partial order>
PartialSorting x 10: limit = 10
Expand Down Expand Up @@ -624,6 +625,8 @@ Union: <for test>
}
CATCH

/// todo support FineGrainedShuffle
/*
TEST_F(PlannerInterpreterExecuteTest, FineGrainedShuffle)
try
{
Expand Down Expand Up @@ -695,6 +698,7 @@ Union: <for test>
ASSERT_BLOCKINPUTSTREAM_EQAUL(topn_expected, topn_request, 10);
}
CATCH
*/

TEST_F(PlannerInterpreterExecuteTest, Join)
try
Expand Down

0 comments on commit 0af0d91

Please sign in to comment.