From 4dcc0cf27b04e6e1131c83576e44b76ca0ec0f80 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Sun, 26 Apr 2020 10:22:41 +0800 Subject: [PATCH] [td-197] fix error in unit test. --- src/query/src/queryExecutor.c | 9 --------- src/query/tests/astTest.cpp | 6 ++---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/query/src/queryExecutor.c b/src/query/src/queryExecutor.c index 75c1b9736b..2143742e24 100644 --- a/src/query/src/queryExecutor.c +++ b/src/query/src/queryExecutor.c @@ -4338,15 +4338,6 @@ static UNUSED_FUNC bool isGroupbyEachTable(SSqlGroupbyExpr *pGroupbyExpr, STable return false; } -static UNUSED_FUNC bool doCheckWithPrevQueryRange(SQuery *pQuery, TSKEY nextKey) { - if ((nextKey > pQuery->window.ekey && QUERY_IS_ASC_QUERY(pQuery)) || - (nextKey < pQuery->window.ekey && !QUERY_IS_ASC_QUERY(pQuery))) { - return false; - } - - return true; -} - static void enableExecutionForNextTable(SQueryRuntimeEnv *pRuntimeEnv) { SQuery *pQuery = pRuntimeEnv->pQuery; diff --git a/src/query/tests/astTest.cpp b/src/query/tests/astTest.cpp index c926c9e7b9..6a78cfbe53 100644 --- a/src/query/tests/astTest.cpp +++ b/src/query/tests/astTest.cpp @@ -556,8 +556,7 @@ void exprSerializeTest1() { ASSERT_TRUE(size > 0); char* b = tbufGetData(&buf, false); - tExprNode* p2 = NULL; - exprTreeFromBinary(b, size, &p2); + tExprNode* p2 = exprTreeFromBinary(b, size); ASSERT_EQ(p1->nodeType, p2->nodeType); ASSERT_EQ(p2->_node.optr, p1->_node.optr); @@ -593,8 +592,7 @@ void exprSerializeTest2() { ASSERT_TRUE(size > 0); char* b = tbufGetData(&buf, false); - tExprNode* p2 = NULL; - exprTreeFromBinary(b, size, &p2); + tExprNode* p2 = exprTreeFromBinary(b, size); ASSERT_EQ(p1->nodeType, p2->nodeType); ASSERT_EQ(p2->_node.optr, p1->_node.optr); -- GitLab