From 79e4cc0ea9951cf99089dbbcd5e255b6a5459102 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Mon, 28 Feb 2022 05:06:07 -0500 Subject: [PATCH] TD-13747 New SQL model integration --- source/libs/parser/test/parserTest.cpp | 14 +++++++------- source/libs/planner/test/plannerTest.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/libs/parser/test/parserTest.cpp b/source/libs/parser/test/parserTest.cpp index b0e6aaf560..ab3054ba26 100644 --- a/source/libs/parser/test/parserTest.cpp +++ b/source/libs/parser/test/parserTest.cpp @@ -23,7 +23,7 @@ using namespace std; using namespace testing; -class NewParserTest : public Test { +class ParserTest : public Test { protected: void setDatabase(const string& acctId, const string& db) { acctId_ = acctId; @@ -510,7 +510,7 @@ private: SQuery* query_; }; -TEST_F(NewParserTest, selectSimple) { +TEST_F(ParserTest, selectSimple) { setDatabase("root", "test"); bind("SELECT * FROM t1"); @@ -529,7 +529,7 @@ TEST_F(NewParserTest, selectSimple) { ASSERT_TRUE(run()); } -TEST_F(NewParserTest, selectConstant) { +TEST_F(ParserTest, selectConstant) { setDatabase("root", "test"); bind("SELECT 123, 20.4, 'abc', \"wxy\", TIMESTAMP '2022-02-09 17:30:20', true, false, 10s FROM t1"); @@ -539,7 +539,7 @@ TEST_F(NewParserTest, selectConstant) { ASSERT_TRUE(run()); } -TEST_F(NewParserTest, selectExpression) { +TEST_F(ParserTest, selectExpression) { setDatabase("root", "test"); bind("SELECT ts + 10s, c1 + 10, concat(c2, 'abc') FROM t1"); @@ -552,7 +552,7 @@ TEST_F(NewParserTest, selectExpression) { ASSERT_TRUE(run()); } -TEST_F(NewParserTest, selectClause) { +TEST_F(ParserTest, selectClause) { setDatabase("root", "test"); // GROUP BY clause @@ -592,7 +592,7 @@ TEST_F(NewParserTest, selectClause) { ASSERT_TRUE(run()); } -TEST_F(NewParserTest, selectSyntaxError) { +TEST_F(ParserTest, selectSyntaxError) { setDatabase("root", "test"); bind("SELECTT * FROM t1"); @@ -608,7 +608,7 @@ TEST_F(NewParserTest, selectSyntaxError) { ASSERT_TRUE(run(TSDB_CODE_FAILED)); } -TEST_F(NewParserTest, selectSemanticError) { +TEST_F(ParserTest, selectSemanticError) { setDatabase("root", "test"); // TSDB_CODE_PAR_INVALID_COLUMN diff --git a/source/libs/planner/test/plannerTest.cpp b/source/libs/planner/test/plannerTest.cpp index 737acaf799..877d984ada 100644 --- a/source/libs/planner/test/plannerTest.cpp +++ b/source/libs/planner/test/plannerTest.cpp @@ -23,7 +23,7 @@ using namespace std; using namespace testing; -class NewPlannerTest : public Test { +class PlannerTest : public Test { protected: enum TestTarget { TEST_LOGIC_PLAN, @@ -114,14 +114,14 @@ private: SQuery* query_; }; -TEST_F(NewPlannerTest, simple) { +TEST_F(PlannerTest, simple) { setDatabase("root", "test"); bind("SELECT * FROM t1"); ASSERT_TRUE(run()); } -TEST_F(NewPlannerTest, groupBy) { +TEST_F(PlannerTest, groupBy) { setDatabase("root", "test"); bind("SELECT count(*) FROM t1"); @@ -137,7 +137,7 @@ TEST_F(NewPlannerTest, groupBy) { ASSERT_TRUE(run()); } -TEST_F(NewPlannerTest, subquery) { +TEST_F(PlannerTest, subquery) { setDatabase("root", "test"); bind("SELECT count(*) FROM (SELECT c1 + c3 a, c1 + count(*) b FROM t1 where c2 = 'abc' GROUP BY c1, c3) where a > 100 group by b");