more code
This commit is contained in:
parent
2b6001b312
commit
8ffc7e9f3e
|
@ -342,6 +342,7 @@ static int32_t (*tDiskColAddValImpl[])(SDiskCol *pDiskCol, SColVal *pColVal) = {
|
||||||
struct SDiskData {
|
struct SDiskData {
|
||||||
int64_t suid;
|
int64_t suid;
|
||||||
int64_t uid;
|
int64_t uid;
|
||||||
|
int32_t nRow;
|
||||||
uint8_t cmprAlg;
|
uint8_t cmprAlg;
|
||||||
SCompressor *pUidC;
|
SCompressor *pUidC;
|
||||||
SCompressor *pVerC;
|
SCompressor *pVerC;
|
||||||
|
@ -355,6 +356,7 @@ int32_t tDiskDataInit(SDiskData *pDiskData, STSchema *pTSchema, TABLEID *pId, ui
|
||||||
|
|
||||||
pDiskData->suid = pId->suid;
|
pDiskData->suid = pId->suid;
|
||||||
pDiskData->uid = pId->uid;
|
pDiskData->uid = pId->uid;
|
||||||
|
pDiskData->nRow = 0;
|
||||||
pDiskData->cmprAlg = cmprAlg;
|
pDiskData->cmprAlg = cmprAlg;
|
||||||
|
|
||||||
if (pDiskData->pUidC == NULL) {
|
if (pDiskData->pUidC == NULL) {
|
||||||
|
@ -443,7 +445,7 @@ int32_t tDiskDataAddRow(SDiskData *pDiskData, TSDBROW *pRow, STSchema *pTSchema,
|
||||||
|
|
||||||
// TSKEY
|
// TSKEY
|
||||||
TSKEY ts = TSDBROW_TS(pRow);
|
TSKEY ts = TSDBROW_TS(pRow);
|
||||||
code = tCompress(pDiskData->pVerC, &ts, sizeof(int64_t));
|
code = tCompress(pDiskData->pKeyC, &ts, sizeof(int64_t));
|
||||||
if (code) goto _exit;
|
if (code) goto _exit;
|
||||||
|
|
||||||
SRowIter iter = {0};
|
SRowIter iter = {0};
|
||||||
|
@ -458,7 +460,8 @@ int32_t tDiskDataAddRow(SDiskData *pDiskData, TSDBROW *pRow, STSchema *pTSchema,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pColVal == NULL || pColVal->cid > pDiskCol->cid) {
|
if (pColVal == NULL || pColVal->cid > pDiskCol->cid) {
|
||||||
code = tDiskColAddValImpl[pDiskCol->flag](pDiskCol, &COL_VAL_NONE(pDiskCol->cid, pDiskCol->type));
|
SColVal cv = COL_VAL_NONE(pDiskCol->cid, pDiskCol->type);
|
||||||
|
code = tDiskColAddValImpl[pDiskCol->flag](pDiskCol, &cv);
|
||||||
if (code) goto _exit;
|
if (code) goto _exit;
|
||||||
} else {
|
} else {
|
||||||
code = tDiskColAddValImpl[pDiskCol->flag](pDiskCol, pColVal);
|
code = tDiskColAddValImpl[pDiskCol->flag](pDiskCol, pColVal);
|
||||||
|
@ -466,6 +469,7 @@ int32_t tDiskDataAddRow(SDiskData *pDiskData, TSDBROW *pRow, STSchema *pTSchema,
|
||||||
pColVal = tRowIterNext(&iter);
|
pColVal = tRowIterNext(&iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pDiskData->nRow++;
|
||||||
|
|
||||||
_exit:
|
_exit:
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -1082,9 +1082,8 @@ int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTS
|
||||||
pColVal = tRowIterNext(&rIter);
|
pColVal = tRowIterNext(&rIter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_exit:
|
|
||||||
pBlockData->nRow++;
|
pBlockData->nRow++;
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
|
||||||
_err:
|
_err:
|
||||||
|
|
Loading…
Reference in New Issue