[td-11818] opt

This commit is contained in:
Haojun Liao 2022-02-09 13:16:23 +08:00
parent 53fe1e4f72
commit b4c898197b
2 changed files with 9 additions and 8 deletions

View File

@ -5711,6 +5711,7 @@ void addToDiskbasedBuf(SOrderOperatorInfo* pInfo, jmp_buf env) {
assert(size <= getBufPageSize(pInfo->pSortInternalBuf));
blockDataToBuf(pPage->data, p);
releaseResBufPage(pInfo->pSortInternalBuf, pPage);
blockDataDestroy(p);
start = stop + 1;

View File

@ -262,7 +262,7 @@ TEST(testCase, external_sort_Test) {
int32_t total = 1;
// while(1) {
while(1) {
int64_t s = taosGetTimestampUs();
pRes = pOperator->exec(pOperator, &newgroup);
@ -270,16 +270,16 @@ TEST(testCase, external_sort_Test) {
printf("---------------elapsed:%ld\n", e - s);
if (pRes == NULL) {
// break;
break;
}
SColumnInfoData* pCol1 = static_cast<SColumnInfoData*>(taosArrayGet(pRes->pDataBlock, 0));
SColumnInfoData* pCol2 = static_cast<SColumnInfoData*>(taosArrayGet(pRes->pDataBlock, 1));
for (int32_t i = 0; i < pRes->info.rows; ++i) {
char* p = colDataGet(pCol2, i);
// SColumnInfoData* pCol1 = static_cast<SColumnInfoData*>(taosArrayGet(pRes->pDataBlock, 0));
// SColumnInfoData* pCol2 = static_cast<SColumnInfoData*>(taosArrayGet(pRes->pDataBlock, 1));
// for (int32_t i = 0; i < pRes->info.rows; ++i) {
// char* p = colDataGet(pCol2, i);
// printf("%d: %d, %s\n", total++, ((int32_t*)pCol1->pData)[i], (char*)varDataVal(p));
}
// }
// }
}
pOperator->cleanupFn(pOperator->info, 2);
tfree(exp);