From 4211db2ec49238ecdfba0feb60b8fe77d8082b8d Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Wed, 20 Jul 2022 21:58:03 +0800 Subject: [PATCH 1/2] fix: fix error in indef operator filter processing --- source/libs/executor/src/executorimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 1bbf05294d..3034911872 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -3957,7 +3957,7 @@ static SSDataBlock* doApplyIndefinitFunction(SOperatorInfo* pOperator) { doFilter(pIndefInfo->pCondition, pInfo->pRes); size_t rows = pInfo->pRes->info.rows; - if (rows >= 0) { + if (rows > 0 || pOperator->status == OP_EXEC_DONE) { break; } } From b905133faf7f32069207c0b6097964b67e735f77 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Thu, 21 Jul 2022 08:42:55 +0800 Subject: [PATCH 2/2] fix: error in test case --- tests/system-test/2-query/max_partition.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/system-test/2-query/max_partition.py b/tests/system-test/2-query/max_partition.py index a352865c45..109c9075f5 100644 --- a/tests/system-test/2-query/max_partition.py +++ b/tests/system-test/2-query/max_partition.py @@ -169,13 +169,13 @@ class TDTestCase: tdSql.checkData(0,1,self.row_nums) tdSql.query("select c1 , mavg(c1 ,2 ) from stb partition by c1") - tdSql.checkRows(72) + tdSql.checkRows(90) tdSql.query("select c1 , diff(c1 , 0) from stb partition by c1") - tdSql.checkRows(72) + tdSql.checkRows(90) tdSql.query("select c1 , csum(c1) from stb partition by c1") - tdSql.checkRows(80) + tdSql.checkRows(100) tdSql.query("select c1 , sample(c1,2) from stb partition by c1 order by c1") tdSql.checkRows(21) @@ -191,7 +191,7 @@ class TDTestCase: tdSql.checkData(0,1,None) tdSql.query("select c1 , DERIVATIVE(c1,2,1) from stb partition by c1 order by c1") - tdSql.checkRows(72) + tdSql.checkRows(90) # bug need fix # tdSql.checkData(0,1,None)