feat: optimize encode/decode resultRow
This commit is contained in:
parent
4961b6ab8e
commit
78fd2d3a3e
|
@ -4974,6 +4974,7 @@ static int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) {
|
||||||
setInputDataBlock(pOperator, pInfo->pCtx, pBlock, order);
|
setInputDataBlock(pOperator, pInfo->pCtx, pBlock, order);
|
||||||
doAggregateImpl(pOperator, 0, pInfo->pCtx);
|
doAggregateImpl(pOperator, 0, pInfo->pCtx);
|
||||||
|
|
||||||
|
#if 0 // test for encode/decode result info
|
||||||
if(pOperator->encodeResultRow){
|
if(pOperator->encodeResultRow){
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
int32_t length = 0;
|
int32_t length = 0;
|
||||||
|
@ -4986,7 +4987,7 @@ static int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) {
|
||||||
taosMemoryFree(result);
|
taosMemoryFree(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
finalizeQueryResult(pInfo->pCtx, pOperator->numOfOutput);
|
finalizeQueryResult(pInfo->pCtx, pOperator->numOfOutput);
|
||||||
|
@ -5036,10 +5037,10 @@ void aggEncodeResultRow(SOperatorInfo* pOperator, SAggSupporter *pSup, SOptrBasi
|
||||||
void* pIter = taosHashIterate(pSup->pResultRowHashTable, NULL);
|
void* pIter = taosHashIterate(pSup->pResultRowHashTable, NULL);
|
||||||
while (pIter) {
|
while (pIter) {
|
||||||
void* key = taosHashGetKey(pIter, &keyLen);
|
void* key = taosHashGetKey(pIter, &keyLen);
|
||||||
SResultRowPosition** p1 = (SResultRowPosition**)pIter;
|
SResultRowPosition* p1 = (SResultRowPosition*)pIter;
|
||||||
|
|
||||||
pPage = (SFilePage*) getBufPage(pSup->pResultBuf, (*p1)->pageId);
|
pPage = (SFilePage*) getBufPage(pSup->pResultBuf, p1->pageId);
|
||||||
pRow = (SResultRow*)((char*)pPage + (*p1)->offset);
|
pRow = (SResultRow*)((char*)pPage + p1->offset);
|
||||||
setBufPageDirty(pPage, true);
|
setBufPageDirty(pPage, true);
|
||||||
releaseBufPage(pSup->pResultBuf, pPage);
|
releaseBufPage(pSup->pResultBuf, pPage);
|
||||||
|
|
||||||
|
@ -5346,7 +5347,7 @@ static int32_t doOpenIntervalAgg(SOperatorInfo* pOperator) {
|
||||||
setInputDataBlock(pOperator, pInfo->binfo.pCtx, pBlock, order);
|
setInputDataBlock(pOperator, pInfo->binfo.pCtx, pBlock, order);
|
||||||
hashIntervalAgg(pOperator, &pInfo->binfo.resultRowInfo, pBlock, 0);
|
hashIntervalAgg(pOperator, &pInfo->binfo.resultRowInfo, pBlock, 0);
|
||||||
|
|
||||||
#if 0
|
#if 0 // test for encode/decode result info
|
||||||
if(pOperator->encodeResultRow){
|
if(pOperator->encodeResultRow){
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
int32_t length = 0;
|
int32_t length = 0;
|
||||||
|
|
Loading…
Reference in New Issue