提交 7dc8b876 编写于 作者: H Hongze Cheng

more work

上级 5efd5a3b
......@@ -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);
......
......@@ -1331,3 +1331,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.
先完成此消息的编辑!
想要评论请 注册