From 0e729ddc95604c2a162b6e6c9199a1466ea6a913 Mon Sep 17 00:00:00 2001 From: Zhigao Tong Date: Thu, 2 Feb 2023 14:36:38 +0800 Subject: [PATCH] revert gtests Signed-off-by: Zhigao Tong --- dbms/src/Flash/tests/gtest_join_executor.cpp | 47 +------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/dbms/src/Flash/tests/gtest_join_executor.cpp b/dbms/src/Flash/tests/gtest_join_executor.cpp index 30d8e9e9bd7..86d61ec517f 100644 --- a/dbms/src/Flash/tests/gtest_join_executor.cpp +++ b/dbms/src/Flash/tests/gtest_join_executor.cpp @@ -706,7 +706,7 @@ CATCH TEST_F(JoinExecutorTestRunner, SplitJoinResult) try { - context.addMockTable("split_test", "t1", {{"a", TiDB::TP::TypeLong}, {"b", TiDB::TP::TypeLong}}, {toVec("a", {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}), toVec("b", {1, 1, 3, 3, 1, 1, 3, 3, 1, 3})}); + context.addMockTable("split_test", "t1", {{"a", TiDB::TP::TypeLong}}, {toVec("a", {1, 1, 1, 1, 1, 1, 1, 1, 1, 1})}); context.addMockTable("split_test", "t2", {{"a", TiDB::TP::TypeLong}}, {toVec("a", {1, 1, 1, 1, 1})}); auto request = context @@ -726,51 +726,6 @@ try ASSERT_EQ(expect[i][j], blocks[j].rows()); } } - - // with other condition - const auto cond = gt(col("b"), lit(Field(static_cast(2)))); - request = context - .scan("split_test", "t1") - .join(context.scan("split_test", "t2"), tipb::JoinType::TypeInnerJoin, {col("a")}, {}, {}, {cond}, {}) - - .build(context); - expect = {{5, 5, 5, 5, 5}, {5, 5, 5, 5, 5}, {5, 5, 5, 5, 5}, {25}, {25}, {25}, {25}, {25}}; - for (size_t i = 0; i < block_sizes.size(); ++i) - { - context.context.setSetting("max_block_size", Field(static_cast(block_sizes[i]))); - auto blocks = getExecuteStreamsReturnBlocks(request); - ASSERT_EQ(expect[i].size(), blocks.size()); - for (size_t j = 0; j < blocks.size(); ++j) - { - ASSERT_EQ(expect[i][j], blocks[j].rows()); - } - } - // test non joined data - context.addMockTable("split_test", "t3", {{"a", TiDB::TP::TypeLong}}, {toVec("a", {2, 2, 2, 2, 2})}); - context.addMockTable("split_test", "t4", {{"a", TiDB::TP::TypeLong}}, {toVec("a", {1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3})}); - request = context - .scan("split_test", "t3") - .join(context.scan("split_test", "t4"), tipb::JoinType::TypeRightOuterJoin, {col("a")}) - .build(context); - - expect = {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, - {2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, - {7, 7, 6}, - {20}, - {20}, - {20}, - {20}, - {20}}; - for (size_t i = 0; i < block_sizes.size(); ++i) - { - context.context.setSetting("max_block_size", Field(static_cast(block_sizes[i]))); - auto blocks = getExecuteStreamsReturnBlocks(request); - ASSERT_EQ(expect[i].size(), blocks.size()); - for (size_t j = 0; j < blocks.size(); ++j) - { - ASSERT_EQ(expect[i][j], blocks[j].rows()); - } - } } CATCH