fix(query): set the group id.
This commit is contained in:
parent
60574763a9
commit
ad45c0a848
|
@ -800,9 +800,15 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
|
|||
taosMemoryFreeClear(pColInfoData);
|
||||
}
|
||||
|
||||
for (int i = 0; i < taosArrayGetSize(res); i++) {
|
||||
size_t numOfTables = taosArrayGetSize(res);
|
||||
for (int i = 0; i < numOfTables; i++) {
|
||||
STableKeyInfo info = {.uid = *(uint64_t*)taosArrayGet(res, i), .groupId = 0};
|
||||
taosArrayPush(pListInfo->pTableList, &info);
|
||||
void* p = taosArrayPush(pListInfo->pTableList, &info);
|
||||
if (p == NULL) {
|
||||
taosArrayDestroy(res);
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
qDebug("tagfilter get uid:%ld", info.uid);
|
||||
}
|
||||
|
||||
|
|
|
@ -4872,8 +4872,8 @@ void destroyMAIOperatorInfo(void* param) {
|
|||
}
|
||||
|
||||
static SResultRow* doSetSingleOutputTupleBuf(SResultRowInfo* pResultRowInfo, SAggSupporter* pSup) {
|
||||
SResultRow* pResult = getNewResultRow(pSup->pResultBuf, &pSup->currentPageId, pSup->resultRowSize);
|
||||
pResultRowInfo->cur = (SResultRowPosition){.pageId = pResult->pageId, .offset = pResult->offset};
|
||||
SResultRow* pResult = getNewResultRow(pSup->pResultBuf, &pSup->currentPageId, pSup->resultRowSize);
|
||||
pResultRowInfo->cur = (SResultRowPosition){.pageId = pResult->pageId, .offset = pResult->offset};
|
||||
return pResult;
|
||||
}
|
||||
|
||||
|
@ -4998,15 +4998,23 @@ static void doMergeAlignedIntervalAgg(SOperatorInfo* pOperator) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (pMiaInfo->groupId != pBlock->info.groupId && pMiaInfo->groupId != 0) {
|
||||
// if there are unclosed time window, close it firstly.
|
||||
ASSERT(pMiaInfo->curTs != INT64_MIN);
|
||||
finalizeResultRows(pIaInfo->aggSup.pResultBuf, &pResultRowInfo->cur, pSup, pRes, pTaskInfo);
|
||||
if (pMiaInfo->groupId == 0) {
|
||||
if (pMiaInfo->groupId != pBlock->info.groupId) {
|
||||
pMiaInfo->groupId = pBlock->info.groupId;
|
||||
}
|
||||
} else {
|
||||
if (pMiaInfo->groupId != pBlock->info.groupId) {
|
||||
// if there are unclosed time window, close it firstly.
|
||||
ASSERT(pMiaInfo->curTs != INT64_MIN);
|
||||
finalizeResultRows(pIaInfo->aggSup.pResultBuf, &pResultRowInfo->cur, pSup, pRes, pTaskInfo);
|
||||
|
||||
pMiaInfo->prefetchedBlock = pBlock;
|
||||
pMiaInfo->curTs = INT64_MIN;
|
||||
pMiaInfo->groupId = 0;
|
||||
break;
|
||||
pMiaInfo->prefetchedBlock = pBlock;
|
||||
pMiaInfo->curTs = INT64_MIN;
|
||||
pMiaInfo->groupId = 0;
|
||||
break;
|
||||
} else {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
getTableScanInfo(pOperator, &pIaInfo->inputOrder, &scanFlag);
|
||||
|
|
Loading…
Reference in New Issue