提交 2261d689 编写于 作者: H Haojun Liao

fix(query): opt read data from file block.

上级 0c1e30dc
......@@ -2393,6 +2393,7 @@ int32_t doAppendRowFromBlock(SSDataBlock* pResBlock, STsdbReader* pReader, SBloc
SColumnInfoData* pColData = taosArrayGet(pResBlock->pDataBlock, i);
if (pColData->info.colId == PRIMARYKEY_TIMESTAMP_COL_ID) {
colDataAppendInt64(pColData, outputRowIndex, &pBlockData->aTSKEY[rowIndex]);
i += 1;
}
SColVal cv = {0};
......@@ -2404,8 +2405,8 @@ int32_t doAppendRowFromBlock(SSDataBlock* pResBlock, STsdbReader* pReader, SBloc
SColData* pData = tBlockDataGetColDataByIdx(pBlockData, j);
if (pData->cid == pCol->info.colId) {
tColDataGetValue(pData, j, &cv);
doCopyColVal(pCol, outputRowIndex++, i, &cv, pSupInfo);
tColDataGetValue(pData, rowIndex, &cv);
doCopyColVal(pCol, outputRowIndex, i, &cv, pSupInfo);
j += 1;
} else { // the specified column does not exist in file block, fill with null data
colDataAppendNULL(pCol, outputRowIndex);
......@@ -2416,7 +2417,7 @@ int32_t doAppendRowFromBlock(SSDataBlock* pResBlock, STsdbReader* pReader, SBloc
while (i < numOfOutputCols) {
SColumnInfoData* pCol = taosArrayGet(pResBlock->pDataBlock, i);
colDataAppendNULL(pCol, rowIndex);
colDataAppendNULL(pCol, outputRowIndex);
i += 1;
}
......
......@@ -3355,6 +3355,7 @@ static void destroyOperatorInfo(SOperatorInfo* pOperator) {
pOperator->numOfDownstream = 0;
}
cleanupExprSupp(&pOperator->exprSupp);
taosMemoryFreeClear(pOperator);
}
......
......@@ -500,11 +500,12 @@ if $rows != 2 then
return -1
endi
sql select stddev(k), stddev(b), stddev(c),tbname, a from m1 group by tbname,a
sql select stddev(k), stddev(b), stddev(c),tbname, a from m1 group by tbname,a order by a asc
if $rows != 2 then
return -1
endi
if $data00 != 1.414213562 then
print expect 1.414213562, actual: $data00
return -1
endi
if $data01 != 14.142135624 then
......@@ -732,6 +733,7 @@ if $rows != 1 then
return -1
endi
if $data00 != 0.005633334 then
print expect 0.005633334, actual: $data00
return -1
endi
......
......@@ -681,12 +681,13 @@ if $data14 != 1 then
return -1
endi
sql select _wstart, irate(c), tbname, t1, t2 from st where t1=1 and ts >= '2020-03-27 04:11:17.732' and ts < '2020-03-27 05:11:17.732' partition by tbname, t1, t2 interval(1m) sliding(15s) order by tbname desc limit 1;
sql select _wstart, irate(c), tbname, t1, t2 from st where t1=1 and ts >= '2020-03-27 04:11:17.732' and ts < '2020-03-27 05:11:17.732' partition by tbname, t1, t2 interval(1m) sliding(15s) order by tbname desc,_wstart asc limit 1;
if $rows != 1 then
return -1
endi
if $data01 != 1.000000000 then
print expect 1.000000000, actual: $data01
return -1
endi
if $data02 != t2 then
......
......@@ -360,6 +360,7 @@ endi
#sql select max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9) from lm_stb0 where ts >= '2018-09-17 09:00:00.000' and ts <= '2018-09-17 10:30:00.000' and c1 > 1 and c2 < 9 and c3 > 2 and c4 < 8 and c5 > 3 and c6 < 7 and c7 > 0 and c8 like '%5' and t1 > 3 and t1 < 6 limit 1 offset 0;
sql select max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9) from lm_stb0 where ts >= '2018-09-17 09:00:00.000' and ts <= '2018-09-17 10:30:00.000' and c1 > 1 and c2 < 9 and c3 > 2 and c4 < 8 and c5 > 3 and c6 < 7 and c7 = true and c8 like '%5' and t1 > 3 and t1 < 6 limit 1 offset 0;
if $rows != 1 then
print expect 1, actual: $rows
return -1
endi
if $data00 != 5 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册