fix: initialize pk type and pk data of output SFirstLastRes when merge

This commit is contained in:
slzhou 2024-04-02 13:39:41 +08:00
parent 94e6f96a75
commit 771c6940b1
1 changed files with 2 additions and 0 deletions

View File

@ -2821,11 +2821,13 @@ static int32_t firstLastTransferInfoImpl(SFirstLastRes* pInput, SFirstLastRes* p
pOutput->isNull = pInput->isNull;
pOutput->ts = pInput->ts;
pOutput->bytes = pInput->bytes;
pOutput->pkType = pInput->pkType;
memcpy(pOutput->buf, pInput->buf, pOutput->bytes);
if (pInput->pkData) {
pOutput->pkBytes = pInput->pkBytes;
memcpy(pOutput->buf+pOutput->bytes, pInput->pkData, pOutput->pkBytes);
pOutput->pkData = pOutput->buf + pOutput->bytes;
}
return TSDB_CODE_SUCCESS;
}