refactor: do some internal refactor.
This commit is contained in:
parent
a5165ab5e7
commit
1a07451bc3
|
@ -4095,9 +4095,6 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SSDataBlock* pDataBlock,
|
|||
// update the number of NULL data rows
|
||||
size_t numOfCols = pSup->numOfCols;
|
||||
|
||||
int32_t i = 0, j = 0;
|
||||
size_t size = taosArrayGetSize(pSup->pColAgg);
|
||||
|
||||
// ensure capacity
|
||||
if (pDataBlock->pDataBlock) {
|
||||
size_t colsNum = taosArrayGetSize(pDataBlock->pDataBlock);
|
||||
|
@ -4112,8 +4109,9 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SSDataBlock* pDataBlock,
|
|||
|
||||
// do fill all null column value SMA info
|
||||
doFillNullColSMA(pSup, pBlock->nRow, numOfCols, pTsAgg);
|
||||
size_t size = taosArrayGetSize(pSup->pColAgg);
|
||||
|
||||
i = 0, j = 0;
|
||||
int32_t i = 0, j = 0;
|
||||
while (j < numOfCols && i < size) {
|
||||
SColumnDataAgg* pAgg = taosArrayGet(pSup->pColAgg, i);
|
||||
if (pAgg->colId == pSup->colId[j]) {
|
||||
|
|
|
@ -1573,8 +1573,7 @@ void destroyOperatorInfo(SOperatorInfo* pOperator) {
|
|||
// each operator should be set their own function to return total cost buffer
|
||||
int32_t optrDefaultBufFn(SOperatorInfo* pOperator) {
|
||||
if (pOperator->blocking) {
|
||||
ASSERT(0);
|
||||
return 0;
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
@ -2201,7 +2200,6 @@ static int32_t extractTbscanInStreamOpTree(SOperatorInfo* pOperator, STableScanI
|
|||
return extractTbscanInStreamOpTree(pOperator->pDownstream[0], ppInfo);
|
||||
} else {
|
||||
SStreamScanInfo* pInfo = pOperator->info;
|
||||
ASSERT(pInfo->pTableScanOp->operatorType == QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN);
|
||||
*ppInfo = pInfo->pTableScanOp->info;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -232,30 +232,6 @@ static bool doLoadBlockSMA(STableScanBase* pTableScanInfo, SSDataBlock* pBlock,
|
|||
if (!allColumnsHaveAgg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// if (allColumnsHaveAgg == true) {
|
||||
int32_t numOfCols = taosArrayGetSize(pBlock->pDataBlock);
|
||||
|
||||
// todo create this buffer during creating operator
|
||||
if (pBlock->pBlockAgg == NULL) {
|
||||
pBlock->pBlockAgg = taosMemoryCalloc(numOfCols, POINTER_BYTES);
|
||||
if (pBlock->pBlockAgg == NULL) {
|
||||
T_LONG_JMP(pTaskInfo->env, TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
}
|
||||
|
||||
size_t num = taosArrayGetSize(pTableScanInfo->matchInfo.pList);
|
||||
for (int32_t i = 0; i < num; ++i) {
|
||||
SColMatchItem* pColMatchInfo = taosArrayGet(pTableScanInfo->matchInfo.pList, i);
|
||||
if (!pColMatchInfo->needOutput) {
|
||||
continue;
|
||||
}
|
||||
|
||||
pBlock->pBlockAgg[pColMatchInfo->dstSlotId] = pColAgg[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue