From c8cbabe419171a01aaebaa0ebc2a305c75402a07 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Tue, 25 Apr 2023 18:13:33 +0800 Subject: [PATCH] cache/none column: move to outter scope --- source/dnode/vnode/src/tsdb/tsdbCache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 63dbb9a4d3..f10b2779b2 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -327,6 +327,8 @@ int32_t tsdbCacheGet(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsR for (int i = 0; i < num_keys; ++i) { SLastCol *pLastCol = tsdbCacheDeserialize(values_list[i]); + int16_t cid = *(int16_t *)taosArrayGet(pCidList, i); + SLastCol noneCol = {.ts = TSKEY_MIN, .colVal = COL_VAL_NONE(cid, pr->pSchema->columns[pr->pSlotIds[i]].type)}; if (pLastCol) { SColVal *pColVal = &pLastCol->colVal; if (IS_VAR_DATA_TYPE(pColVal->type)) { @@ -340,8 +342,7 @@ int32_t tsdbCacheGet(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsR // recalc: load from tsdb // still null, then make up a null col value - int16_t cid = *(int16_t *)taosArrayGet(pCidList, i); - pLastCol = &(SLastCol){.ts = TSKEY_MIN, .colVal = COL_VAL_NONE(cid, pr->pSchema->columns[pr->pSlotIds[i]].type)}; + pLastCol = &noneCol; // maybe store it back to rocks cache } -- GitLab