提交 9cddf060 编写于 作者: G Ganlin Zhao

handle 0 result case for groups

上级 e4c9a747
...@@ -875,7 +875,13 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { ...@@ -875,7 +875,13 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
if (pSliceInfo->pRemainRes == NULL) { if (pSliceInfo->pRemainRes == NULL) {
pSliceInfo->pNextGroupRes = NULL; pSliceInfo->pNextGroupRes = NULL;
} }
goto _finished; if (pResBlock->info.rows != 0) {
goto _finished;
} else {
// after fillter if result block has 0 rows, go back to
// process pNextGroupRes again for unfinished data
continue;
}
} }
pSliceInfo->pNextGroupRes = NULL; pSliceInfo->pNextGroupRes = NULL;
} }
...@@ -900,7 +906,9 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { ...@@ -900,7 +906,9 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
doHandleTimeslice(pOperator, pBlock); doHandleTimeslice(pOperator, pBlock);
if (checkWindowBoundReached(pSliceInfo) || checkThresholdReached(pSliceInfo, pOperator->resultInfo.threshold)) { if (checkWindowBoundReached(pSliceInfo) || checkThresholdReached(pSliceInfo, pOperator->resultInfo.threshold)) {
doFilter(pResBlock, pOperator->exprSupp.pFilterInfo, NULL); doFilter(pResBlock, pOperator->exprSupp.pFilterInfo, NULL);
goto _finished; if (pResBlock->info.rows != 0) {
goto _finished;
}
} }
} }
// post work for a specific group // post work for a specific group
...@@ -916,8 +924,8 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { ...@@ -916,8 +924,8 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
// restore initial value for next group // restore initial value for next group
resetTimesliceInfo(pSliceInfo); resetTimesliceInfo(pSliceInfo);
if (checkThresholdReached(pSliceInfo, pOperator->resultInfo.threshold)) { if (pResBlock->info.rows != 0) {
goto _finished; break;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册