fix(stream):stream unsupported having clause

This commit is contained in:
54liuyao 2025-01-06 15:30:44 +08:00
parent ee89a84ff2
commit daad609cc1
2 changed files with 11 additions and 0 deletions

View File

@ -11510,6 +11510,10 @@ static int32_t checkStreamQuery(STranslateContext* pCxt, SCreateStreamStmt* pStm
}
}
if (NULL != pSelect->pHaving) {
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported Having");
}
return TSDB_CODE_SUCCESS;
}

View File

@ -146,4 +146,11 @@ sql_error create stream streams2 trigger max_delay 4s ignore update 0 ignore exp
sql create stream streams3 trigger max_delay 5000a ignore update 0 ignore expired 0 into streamtST3 as select _wstart, count(*) from st interval(5s);
sql create stream streams4 trigger max_delay 5s ignore update 0 ignore expired 0 into streamtST4 as select _wstart, count(*) from st interval(5s);
sql_error create stream streams5 trigger at_once ignore update 0 ignore expired 0 into streamtST5 as select _wstart, count(*) from st interval(5s) having count(*) > 2;
sql_error create stream streams6 trigger at_once ignore update 0 ignore expired 0 into streamtST6 as select _wstart, count(*) from st session(ts, 5s) having count(*) > 2;
sql_error create stream streams7 trigger at_once ignore update 0 ignore expired 1 into streamtST7 as select _wstart, count(*) from st count_window(10) having count(*) > 2;
sql_error create stream streams8 trigger at_once ignore update 0 ignore expired 0 into streamtST8 as select _wstart, count(*) from st state_window(a) having count(*) > 2;
sql_error create stream streams9 trigger at_once ignore update 0 ignore expired 0 into streamtST9 as select _wstart, count(*) from st event_window start with a = 0 end with b = 9 having count(*) > 2;
system sh/exec.sh -n dnode1 -s stop -x SIGINT