fix: window pseudo column check

This commit is contained in:
Xiaoyu Wang 2022-09-22 17:27:30 +08:00
parent 9f45f81aa0
commit 62b9419351
1 changed files with 4 additions and 0 deletions

View File

@ -1476,6 +1476,10 @@ static int32_t translateWindowPseudoColumnFunc(STranslateContext* pCxt, SFunctio
if (!isSelectStmt(pCxt->pCurrStmt) || NULL == ((SSelectStmt*)pCxt->pCurrStmt)->pWindow) {
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC);
}
if (beforeHaving(pCxt->currClause)) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_WINDOW_PC, "There mustn't be %s",
pFunc->functionName);
}
return TSDB_CODE_SUCCESS;
}