fix(stream): check reload function

This commit is contained in:
54liuyao 2024-10-11 15:27:29 +08:00
parent 998eeb2fe9
commit ef0782d378
2 changed files with 4 additions and 2 deletions

View File

@ -1643,7 +1643,9 @@ int32_t qStreamOperatorReleaseState(qTaskInfo_t tInfo) {
int32_t qStreamOperatorReloadState(qTaskInfo_t tInfo) {
SExecTaskInfo* pTaskInfo = (SExecTaskInfo*)tInfo;
pTaskInfo->pRoot->fpSet.reloadStreamStateFn(pTaskInfo->pRoot);
if (pTaskInfo->pRoot->fpSet.reloadStreamStateFn != NULL) {
pTaskInfo->pRoot->fpSet.reloadStreamStateFn(pTaskInfo->pRoot);
}
return 0;
}

View File

@ -10813,7 +10813,7 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm
}
}
if (NULL != pSelect->pGroupByList) {
if (NULL != pSelect->pGroupByList || (pSelect->pWindow == NULL && pSelect->hasAggFuncs)) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported Group by");
}