fix(query): fix sum,count,max,min function no output when input is constant value
TD-15107
This commit is contained in:
parent
f1a0d736cf
commit
8181ef84db
|
@ -1105,6 +1105,10 @@ static int32_t doSetInputDataBlock(SOperatorInfo* pOperator, SqlFunctionCtx* pCt
|
||||||
// todo avoid case: top(k, 12), 12 is the value parameter.
|
// todo avoid case: top(k, 12), 12 is the value parameter.
|
||||||
// sum(11), 11 is also the value parameter.
|
// sum(11), 11 is also the value parameter.
|
||||||
if (createDummyCol && pOneExpr->base.numOfParams == 1) {
|
if (createDummyCol && pOneExpr->base.numOfParams == 1) {
|
||||||
|
pInput->totalRows = pBlock->info.rows;
|
||||||
|
pInput->numOfRows = pBlock->info.rows;
|
||||||
|
pInput->startRowIndex = 0;
|
||||||
|
|
||||||
code = doCreateConstantValColumnInfo(pInput, pFuncParam, pFuncParam->param.nType, j, pBlock->info.rows);
|
code = doCreateConstantValColumnInfo(pInput, pFuncParam, pFuncParam->param.nType, j, pBlock->info.rows);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
return code;
|
return code;
|
||||||
|
@ -7232,4 +7236,4 @@ SOperatorInfo* createJoinOperatorInfo(SOperatorInfo** pDownstream, int32_t numOf
|
||||||
taosMemoryFree(pOperator);
|
taosMemoryFree(pOperator);
|
||||||
pTaskInfo->code = TSDB_CODE_OUT_OF_MEMORY;
|
pTaskInfo->code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue