fix(query): set the correct primary timestamp column for first/last function.
This commit is contained in:
parent
aad6740d47
commit
0ebd90b549
|
@ -1101,7 +1101,10 @@ static int32_t doSetInputDataBlock(SOperatorInfo* pOperator, SqlFunctionCtx* pCt
|
|||
pInput->numOfRows = pBlock->info.rows;
|
||||
pInput->startRowIndex = 0;
|
||||
|
||||
pInput->pPTS = taosArrayGet(pBlock->pDataBlock, 0); // todo set the correct timestamp column
|
||||
// the last parameter is the timestamp column
|
||||
if (fmIsTimelineFunc(pCtx[i].functionId) && (j == pOneExpr->base.numOfParams - 1)) {
|
||||
pInput->pPTS = pInput->pData[j];
|
||||
}
|
||||
ASSERT(pInput->pData[j] != NULL);
|
||||
} else if (pFuncParam->type == FUNC_PARAM_TYPE_VALUE) {
|
||||
// todo avoid case: top(k, 12), 12 is the value parameter.
|
||||
|
|
Loading…
Reference in New Issue