adj stream operator result

This commit is contained in:
54liuyao 2024-07-18 16:39:01 +08:00
parent 0497224fe7
commit afa7d04aaf
2 changed files with 2 additions and 1 deletions

View File

@ -1374,7 +1374,7 @@ static SSDataBlock* doStreamHashPartition(SOperatorInfo* pOperator) {
pInfo->pTbNameIte = taosHashIterate(pInfo->pPartitions, NULL);
code = buildStreamCreateTableResult(pOperator);
TSDB_CHECK_CODE(code, lino, _end);
if (pInfo->pCreateTbRes->info.rows > 0) {
if (pInfo->pCreateTbRes && pInfo->pCreateTbRes->info.rows > 0) {
return pInfo->pCreateTbRes;
}
return buildStreamPartitionResult(pOperator);

View File

@ -713,6 +713,7 @@ int32_t sessionWinStateGetKVByCur(SStreamStateCur* pCur, SSessionKey* pKey, void
if (!pNewPos || !pNewPos->pRowBuff) {
code = TSDB_CODE_OUT_OF_MEMORY;
taosMemoryFreeClear(pData);
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
return code;
}
memcpy(pNewPos->pKey, pKey, sizeof(SSessionKey));