fix(tsdb): not copy range key if no pk exists.

This commit is contained in:
Haojun Liao 2024-04-06 00:10:24 +08:00
parent 1b30d214eb
commit e7ed8fbaa6
1 changed files with 4 additions and 2 deletions

View File

@ -502,8 +502,10 @@ static void setSttInfoForCurrentTable(SSttBlockLoadInfo *pLoadInfo, uint64_t uid
*numOfRows += *(int64_t *)taosArrayGet(pLoadInfo->info.pCount, index);
memcpy(&pRange->skey.pks[0], taosArrayGet(pLoadInfo->info.pFirstKey, index), sizeof(SValue));
memcpy(&pRange->ekey.pks[0], taosArrayGet(pLoadInfo->info.pLastKey, index), sizeof(SValue));
if (pRange->skey.numOfPKs > 0) {
memcpy(&pRange->skey.pks[0], taosArrayGet(pLoadInfo->info.pFirstKey, index), sizeof(SValue));
memcpy(&pRange->ekey.pks[0], taosArrayGet(pLoadInfo->info.pLastKey, index), sizeof(SValue));
}
}
}