[td-225] refactor.
This commit is contained in:
parent
e7cad3db7d
commit
c5ee2fd58d
|
@ -1265,8 +1265,7 @@ static void hashIntervalAgg(SOperatorInfo* pOperatorInfo, SResultRowInfo* pResul
|
||||||
for (int32_t j = prevIndex; j < curIndex; ++j) { // previous time window may be all closed already.
|
for (int32_t j = prevIndex; j < curIndex; ++j) { // previous time window may be all closed already.
|
||||||
SResultRow* pRes = pResultRowInfo->pResult[j];
|
SResultRow* pRes = pResultRowInfo->pResult[j];
|
||||||
if (pRes->closed) {
|
if (pRes->closed) {
|
||||||
assert(resultRowInterpolated(pRes, RESULT_ROW_START_INTERP) &&
|
assert(resultRowInterpolated(pRes, RESULT_ROW_START_INTERP) && resultRowInterpolated(pRes, RESULT_ROW_END_INTERP));
|
||||||
resultRowInterpolated(pRes, RESULT_ROW_END_INTERP));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5327,9 +5326,16 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
|
||||||
|
|
||||||
SOperatorInfo* upstream = pOperator->upstream[0];
|
SOperatorInfo* upstream = pOperator->upstream[0];
|
||||||
|
|
||||||
|
int64_t ss = taosGetTimestampMs();
|
||||||
|
printf("=-=============%ld\n", ss);
|
||||||
while(1) {
|
while(1) {
|
||||||
publishOperatorProfEvent(upstream, QUERY_PROF_BEFORE_OPERATOR_EXEC);
|
publishOperatorProfEvent(upstream, QUERY_PROF_BEFORE_OPERATOR_EXEC);
|
||||||
|
int64_t s = taosGetTimestampMs();
|
||||||
|
printf("start: %ld\n", s);
|
||||||
SSDataBlock* pBlock = upstream->exec(upstream, newgroup);
|
SSDataBlock* pBlock = upstream->exec(upstream, newgroup);
|
||||||
|
|
||||||
|
int64_t end = taosGetTimestampMs();
|
||||||
|
printf("end: %ld, el:%ld \n", end, end - s);
|
||||||
publishOperatorProfEvent(upstream, QUERY_PROF_AFTER_OPERATOR_EXEC);
|
publishOperatorProfEvent(upstream, QUERY_PROF_AFTER_OPERATOR_EXEC);
|
||||||
|
|
||||||
if (pBlock == NULL) {
|
if (pBlock == NULL) {
|
||||||
|
@ -5338,9 +5344,16 @@ static SSDataBlock* doIntervalAgg(void* param, bool* newgroup) {
|
||||||
|
|
||||||
// the pDataBlock are always the same one, no need to call this again
|
// the pDataBlock are always the same one, no need to call this again
|
||||||
setInputDataBlock(pOperator, pIntervalInfo->pCtx, pBlock, pQueryAttr->order.order);
|
setInputDataBlock(pOperator, pIntervalInfo->pCtx, pBlock, pQueryAttr->order.order);
|
||||||
|
|
||||||
|
int64_t x1 = taosGetTimestampMs();
|
||||||
hashIntervalAgg(pOperator, &pIntervalInfo->resultRowInfo, pBlock, 0);
|
hashIntervalAgg(pOperator, &pIntervalInfo->resultRowInfo, pBlock, 0);
|
||||||
|
int64_t x2 = taosGetTimestampMs();
|
||||||
|
printf("-------------------------inter:%ld\n", x2-x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int64_t s1 = taosGetTimestampMs();
|
||||||
|
printf("=-=============%ld, el:%ld\n", s1, s1-ss);
|
||||||
|
|
||||||
// restore the value
|
// restore the value
|
||||||
pQueryAttr->order.order = order;
|
pQueryAttr->order.order = order;
|
||||||
pQueryAttr->window = win;
|
pQueryAttr->window = win;
|
||||||
|
|
Loading…
Reference in New Issue