fix(query): fix sma info in query procesing.
This commit is contained in:
parent
bddb3e356d
commit
d680da3380
|
@ -348,6 +348,8 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
|
|||
taosThreadOnce(&initPoolOnce, initRefPool);
|
||||
atexit(cleanupRefPool);
|
||||
|
||||
qDebug("start to create subplan task, TID:0x%"PRIx64 " QID:0x%"PRIx64, taskId, pSubplan->id.queryId);
|
||||
|
||||
int32_t code = createExecTaskInfoImpl(pSubplan, pTask, readHandle, taskId, sql, model);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
goto _error;
|
||||
|
@ -372,6 +374,8 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
|
|||
}
|
||||
}
|
||||
|
||||
qDebug("subplan task create completed, TID:0x%"PRIx64 " QID:0x%"PRIx64, taskId, pSubplan->id.queryId);
|
||||
|
||||
_error:
|
||||
// if failed to add ref for all tables in this query, abort current query
|
||||
return code;
|
||||
|
|
|
@ -343,6 +343,9 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableSca
|
|||
}
|
||||
}
|
||||
|
||||
// free the sma info, since it should not be involved in later computing process.
|
||||
taosMemoryFreeClear(pBlock->pBlockAgg);
|
||||
|
||||
// try to filter data block according to current results
|
||||
doDynamicPruneDataBlock(pOperator, pBlockInfo, status);
|
||||
if (*status == FUNC_DATA_REQUIRED_NOT_LOAD) {
|
||||
|
|
|
@ -263,6 +263,9 @@ sql select sum(c1), avg(c2), stddev(c3), max(c4), min(c5), count(c6), first(c7),
|
|||
if $rows != 0 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print select sum(c1), avg(c2), stddev(c3), max(c4), min(c5), count(c6), first(c7), last(c8), last(c9) from $tb where ts >= $ts0 and ts <= $tsu and c1>1 and c2<9 and c3>2 and c4<8 and c5>4 and c6<6 limit 1 offset 0
|
||||
|
||||
sql select sum(c1), avg(c2), stddev(c3), max(c4), min(c5), count(c6), first(c7), last(c8), last(c9) from $tb where ts >= $ts0 and ts <= $tsu and c1>1 and c2<9 and c3>2 and c4<8 and c5>4 and c6<6 limit 1 offset 0
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
|
@ -270,6 +273,7 @@ endi
|
|||
$val = $rowNum / 10
|
||||
$val = $val * 5
|
||||
if $data00 != $val then
|
||||
print $data00, expect $val
|
||||
return -1
|
||||
endi
|
||||
if $data01 != 5.000000000 then
|
||||
|
|
|
@ -92,6 +92,7 @@ if $data03 != 319 then
|
|||
return -1
|
||||
endi
|
||||
if $data04 != 318.000000000 then
|
||||
print expect 318.000000000, actual: $data04
|
||||
return -1
|
||||
endi
|
||||
if $data05 != 1 then
|
||||
|
|
Loading…
Reference in New Issue