fix(query): fix tail function points larger than total rows issue
This commit is contained in:
parent
21b5f72340
commit
a281da1379
|
@ -3236,6 +3236,7 @@ int32_t tailFunction(SqlFunctionCtx* pCtx) {
|
||||||
SColumnInfoData* pOutput = (SColumnInfoData*)pCtx->pOutput;
|
SColumnInfoData* pOutput = (SColumnInfoData*)pCtx->pOutput;
|
||||||
|
|
||||||
int32_t startOffset = pCtx->offset;
|
int32_t startOffset = pCtx->offset;
|
||||||
|
pInfo->numOfPoints = MIN(pInfo->numOfPoints, pInput->numOfRows);
|
||||||
for (int32_t i = pInput->startRowIndex; i < pInput->numOfRows + pInput->startRowIndex; i += 1) {
|
for (int32_t i = pInput->startRowIndex; i < pInput->numOfRows + pInput->startRowIndex; i += 1) {
|
||||||
|
|
||||||
char* data = colDataGetData(pInputCol, i);
|
char* data = colDataGetData(pInputCol, i);
|
||||||
|
|
Loading…
Reference in New Issue