提交 75f76a62 编写于 作者: G Ganlin Zhao

fix process next group bug

上级 fc6ca69a
...@@ -473,7 +473,6 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS ...@@ -473,7 +473,6 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS
} }
if (pSliceInfo->current > pSliceInfo->win.ekey) { if (pSliceInfo->current > pSliceInfo->win.ekey) {
setOperatorCompleted(pOperator);
break; break;
} }
...@@ -486,7 +485,6 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS ...@@ -486,7 +485,6 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS
pSliceInfo->current = pSliceInfo->current =
taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision);
if (pSliceInfo->current > pSliceInfo->win.ekey) { if (pSliceInfo->current > pSliceInfo->win.ekey) {
setOperatorCompleted(pOperator);
break; break;
} }
} else if (ts < pSliceInfo->current) { } else if (ts < pSliceInfo->current) {
...@@ -510,7 +508,6 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS ...@@ -510,7 +508,6 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS
} }
if (pSliceInfo->current > pSliceInfo->win.ekey) { if (pSliceInfo->current > pSliceInfo->win.ekey) {
setOperatorCompleted(pOperator);
break; break;
} }
} else { } else {
...@@ -544,14 +541,13 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS ...@@ -544,14 +541,13 @@ static void doTimesliceImpl(SOperatorInfo* pOperator, STimeSliceOperatorInfo* pS
doKeepPrevRows(pSliceInfo, pBlock, i); doKeepPrevRows(pSliceInfo, pBlock, i);
if (pSliceInfo->current > pSliceInfo->win.ekey) { if (pSliceInfo->current > pSliceInfo->win.ekey) {
setOperatorCompleted(pOperator);
break; break;
} }
} }
} }
} }
static void revertTimesliceInfo(STimeSliceOperatorInfo* pSliceInfo) { static void restoreTimesliceInfo(STimeSliceOperatorInfo* pSliceInfo) {
pSliceInfo->current = pSliceInfo->win.skey; pSliceInfo->current = pSliceInfo->win.skey;
pSliceInfo->prevTsSet = false; pSliceInfo->prevTsSet = false;
} }
...@@ -582,6 +578,7 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { ...@@ -582,6 +578,7 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
while (1) { while (1) {
SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream);
if (pBlock == NULL) { if (pBlock == NULL) {
setOperatorCompleted(pOperator);
break; break;
} }
...@@ -591,7 +588,8 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { ...@@ -591,7 +588,8 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
if (pSliceInfo->groupId != pBlock->info.id.groupId) { if (pSliceInfo->groupId != pBlock->info.id.groupId) {
pSliceInfo->groupId = pBlock->info.id.groupId; pSliceInfo->groupId = pBlock->info.id.groupId;
pSliceInfo->pNextGroupRes = pBlock; pSliceInfo->pNextGroupRes = pBlock;
break; restoreTimesliceInfo(pSliceInfo);
goto _group_over;
} }
} }
...@@ -618,10 +616,13 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { ...@@ -618,10 +616,13 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) {
pSliceInfo->current = pSliceInfo->current =
taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision);
} }
}
_group_over:
doFilter(pResBlock, pOperator->exprSupp.pFilterInfo, NULL); doFilter(pResBlock, pOperator->exprSupp.pFilterInfo, NULL);
if (pOperator->status == OP_EXEC_DONE) {
break;
}
}
// restore the value // restore the value
setTaskStatus(pOperator->pTaskInfo, TASK_COMPLETED); setTaskStatus(pOperator->pTaskInfo, TASK_COMPLETED);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册