提交 79e4cc0e 编写于 作者: X Xiaoyu Wang

TD-13747 New SQL model integration

上级 cd7a0e55
......@@ -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
......
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册