提交 120ee13d 编写于 作者: H Haojun Liao

refactor: do some internal refactor.

上级 595a57df
...@@ -895,13 +895,15 @@ static void doSetQualifiedUid(SArray* pUidList, const SArray* pUidTagList, bool* ...@@ -895,13 +895,15 @@ static void doSetQualifiedUid(SArray* pUidList, const SArray* pUidTagList, bool*
static void copyExistedUids(SArray* pUidTagList, const SArray* pUidList) { static void copyExistedUids(SArray* pUidTagList, const SArray* pUidList) {
int32_t numOfExisted = taosArrayGetSize(pUidList); int32_t numOfExisted = taosArrayGetSize(pUidList);
if (numOfExisted) { if (numOfExisted == 0) {
return;
}
for(int32_t i = 0; i < numOfExisted; ++i) { for(int32_t i = 0; i < numOfExisted; ++i) {
uint64_t* uid = taosArrayGet(pUidList, i); uint64_t* uid = taosArrayGet(pUidList, i);
STUidTagInfo info = {.uid = *uid}; STUidTagInfo info = {.uid = *uid};
taosArrayPush(pUidTagList, &info); taosArrayPush(pUidTagList, &info);
} }
}
} }
static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SNode* pTagCond, void* metaHandle) { static int32_t doFilterByTagCond(STableListInfo* pListInfo, SArray* pUidList, SNode* pTagCond, void* metaHandle) {
...@@ -1065,7 +1067,6 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode, ...@@ -1065,7 +1067,6 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
size_t size = numOfTables * sizeof(uint64_t) + sizeof(int32_t); size_t size = numOfTables * sizeof(uint64_t) + sizeof(int32_t);
char* pPayload = taosMemoryMalloc(size); char* pPayload = taosMemoryMalloc(size);
// todo convert to uid list
if (numOfTables > 0) { if (numOfTables > 0) {
*(int32_t*)pPayload = numOfTables; *(int32_t*)pPayload = numOfTables;
memcpy(pPayload + sizeof(int32_t), taosArrayGet(pRes, 0), numOfTables * sizeof(uint64_t)); memcpy(pPayload + sizeof(int32_t), taosArrayGet(pRes, 0), numOfTables * sizeof(uint64_t));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册