fix errors
This commit is contained in:
parent
ca51b86359
commit
f913fbdaf6
|
@ -526,7 +526,7 @@ static int32_t getNumOfElems(SqlFunctionCtx* pCtx) {
|
|||
* count function does not use the pCtx->interResBuf to keep the intermediate buffer
|
||||
*/
|
||||
int32_t countFunction(SqlFunctionCtx* pCtx) {
|
||||
int32_t numOfElem = getNumOfElems(pCtx);
|
||||
int32_t numOfElem = 0;
|
||||
|
||||
SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx);
|
||||
SInputColumnInfoData* pInput = &pCtx->input;
|
||||
|
@ -539,6 +539,7 @@ int32_t countFunction(SqlFunctionCtx* pCtx) {
|
|||
numOfElem = 1;
|
||||
*((int64_t*)buf) = 0;
|
||||
} else {
|
||||
numOfElem = getNumOfElems(pCtx);
|
||||
*((int64_t*)buf) += numOfElem;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ endi
|
|||
|
||||
# regression test case 1
|
||||
sql select count(*) from lr_tb1 where ts>'2018-09-18 08:45:00.1' and ts<'2018-09-18 08:45:00.2'
|
||||
if $row != 0 then
|
||||
if $row != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ class TDTestCase:
|
|||
tdSql.checkRows(20)
|
||||
|
||||
tdSql.query(f"select count(c1) from {dbname}.stb1 where t1> 4 partition by tbname")
|
||||
tdSql.checkRows(16)
|
||||
tdSql.checkRows(15)
|
||||
|
||||
# union all
|
||||
tdSql.query(f"select count(c1) from {dbname}.stb1 union all select count(c1) from {dbname}.stb1 ")
|
||||
|
|
Loading…
Reference in New Issue