fix(last_row): fix empty table condition
This commit is contained in:
parent
f1f80d57b8
commit
01e5e124fb
|
@ -1070,10 +1070,10 @@ static int32_t tsdbCacheUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, SArray
|
||||||
|
|
||||||
rocksdb_writebatch_t *wb = pTsdb->rCache.writebatch;
|
rocksdb_writebatch_t *wb = pTsdb->rCache.writebatch;
|
||||||
for (int i = 0; i < num_keys; ++i) {
|
for (int i = 0; i < num_keys; ++i) {
|
||||||
SIdxKey *idxKey = &((SIdxKey *)TARRAY_DATA(remainCols))[i];
|
SIdxKey *idxKey = &((SIdxKey *)TARRAY_DATA(remainCols))[i];
|
||||||
SLastUpdateCtx *updCtx = (SLastUpdateCtx *)taosArrayGet(updCtxArray, i);
|
SLastUpdateCtx *updCtx = (SLastUpdateCtx *)taosArrayGet(updCtxArray, i);
|
||||||
SRowKey *pRowKey = &updCtx->tsdbRowKey.key;
|
SRowKey *pRowKey = &updCtx->tsdbRowKey.key;
|
||||||
SColVal *pColVal = &updCtx->colVal;
|
SColVal *pColVal = &updCtx->colVal;
|
||||||
|
|
||||||
SLastCol *pLastCol = tsdbCacheDeserialize(values_list[i], values_list_sizes[i]);
|
SLastCol *pLastCol = tsdbCacheDeserialize(values_list[i], values_list_sizes[i]);
|
||||||
SLastCol *PToFree = pLastCol;
|
SLastCol *PToFree = pLastCol;
|
||||||
|
@ -1156,9 +1156,9 @@ int32_t tsdbCacheRowFormatUpdate(STsdb *pTsdb, tb_uid_t suid, tb_uid_t uid, int6
|
||||||
// 1. prepare last
|
// 1. prepare last
|
||||||
TSDBROW lRow = {.type = TSDBROW_ROW_FMT, .pTSRow = aRow[nRow - 1], .version = version};
|
TSDBROW lRow = {.type = TSDBROW_ROW_FMT, .pTSRow = aRow[nRow - 1], .version = version};
|
||||||
|
|
||||||
STSchema *pTSchema = NULL;
|
STSchema *pTSchema = NULL;
|
||||||
int32_t sver = TSDBROW_SVERSION(&lRow);
|
int32_t sver = TSDBROW_SVERSION(&lRow);
|
||||||
SArray *ctxArray = NULL;
|
SArray *ctxArray = NULL;
|
||||||
SSHashObj *iColHash = NULL;
|
SSHashObj *iColHash = NULL;
|
||||||
|
|
||||||
code = metaGetTbTSchemaEx(pTsdb->pVnode->pMeta, suid, uid, sver, &pTSchema);
|
code = metaGetTbTSchemaEx(pTsdb->pVnode->pMeta, suid, uid, sver, &pTSchema);
|
||||||
|
@ -1577,7 +1577,7 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr
|
||||||
if (/*!pTmpColArray*/ lastTmpIndexArray && !lastTmpColArray) {
|
if (/*!pTmpColArray*/ lastTmpIndexArray && !lastTmpColArray) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (/*!pTmpColArray*/ lastrowTmpIndexArray && lastrowTmpColArray) {
|
if (/*!pTmpColArray*/ lastrowTmpIndexArray && !lastrowTmpColArray) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue