fix: (last) mergeLastCid add check for iCol

This commit is contained in:
Shungang Li 2024-09-07 17:45:16 +08:00
parent 9a3bc48326
commit 03b1ec08d1
1 changed files with 4 additions and 0 deletions

View File

@ -3221,6 +3221,10 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC
break;
}
// high version's column value
if (slotIds[iCol] > pTSchema->numOfCols - 1) {
continue;
}
SLastCol *lastColVal = (SLastCol *)taosArrayGet(pColArray, iCol);
if (lastColVal->colVal.cid != pTSchema->columns[slotIds[iCol]].colId) {
continue;