提交 10ab8ca8 编写于 作者: H Haojun Liao

Merge remote-tracking branch 'origin/feat/tsdb_refact' into feat/tsdb_refact

......@@ -151,6 +151,7 @@ int32_t tBlockDataAddColData(SBlockData *pBlockData, int32_t iColData, SColData
int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTSchema);
int32_t tBlockDataMerge(SBlockData *pBlockData1, SBlockData *pBlockData2, SBlockData *pBlockData);
int32_t tBlockDataCopy(SBlockData *pBlockDataSrc, SBlockData *pBlockDataDest);
void tBlockDataGetColData(SBlockData *pBlockData, int16_t cid, SColData **ppColData);
// SDelIdx
int32_t tPutDelIdx(uint8_t *p, void *ph);
int32_t tGetDelIdx(uint8_t *p, void *ph);
......
......@@ -647,15 +647,11 @@ void tsdbRowGetColVal(TSDBROW *pRow, STSchema *pTSchema, int32_t iCol, SColVal *
if (pRow->type == 0) {
tTSRowGetVal(pRow->pTSRow, pTSchema, iCol, pColVal);
} else if (pRow->type == 1) {
SColData *pColData = &(SColData){.cid = pTColumn->colId};
void *p = NULL;
SColData *pColData;
p = taosArraySearch(pRow->pBlockData->aColDataP, &pColData, tColDataPCmprFn, TD_EQ);
if (p) {
pColData = *(SColData **)p;
ASSERT(pColData->type == pTColumn->type);
tBlockDataGetColData(pRow->pBlockData, pTColumn->colId, &pColData);
if (pColData) {
tColDataGetValue(pColData, pRow->iRow, pColVal);
} else {
*pColVal = COL_VAL_NONE(pTColumn->colId, pTColumn->type);
......@@ -1331,3 +1327,16 @@ int32_t tBlockDataCopy(SBlockData *pBlockDataSrc, SBlockData *pBlockDataDest) {
_exit:
return code;
}
void tBlockDataGetColData(SBlockData *pBlockData, int16_t cid, SColData **ppColData) {
ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID);
SColData *pColData = &(SColData){.cid = cid};
void *p = taosArraySearch(pBlockData->aColDataP, &pColData, tColDataPCmprFn, TD_EQ);
if (p == NULL) {
*ppColData = NULL;
} else {
*ppColData = *(SColData **)p;
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册