add some check

This commit is contained in:
Ganlin Zhao 2022-06-13 21:21:46 +08:00
parent 763e8bd6ae
commit d4a38245a2
1 changed files with 3 additions and 0 deletions

View File

@ -2432,6 +2432,9 @@ int32_t lastFunction(SqlFunctionCtx* pCtx) {
}
static void firstLastTransferInfo(SFirstLastRes* pInput, SFirstLastRes* pOutput) {
if (!pInput->hasResult) {
return;
}
pOutput->bytes = pInput->bytes;
TSKEY *tsIn = (TSKEY*)(pInput->buf + pInput->bytes);
TSKEY *tsOut = (TSKEY*)(pOutput->buf + pInput->bytes);