fix scalar error

This commit is contained in:
Ganlin Zhao 2022-11-28 22:54:27 +08:00
parent 8c90a98e2d
commit 0597511460
1 changed files with 1 additions and 1 deletions

View File

@ -1696,7 +1696,7 @@ static int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) {
}
// there is an scalar expression that needs to be calculated before apply the group aggregation.
if (pAggInfo->scalarExprSup.pExprInfo != NULL) {
if (pAggInfo->scalarExprSup.pExprInfo != NULL && !blockAllocated) {
SExprSupp* pSup1 = &pAggInfo->scalarExprSup;
code = projectApplyFunctions(pSup1->pExprInfo, pBlock, pBlock, pSup1->pCtx, pSup1->numOfExprs, NULL);
if (code != TSDB_CODE_SUCCESS) {