fix(stream):not support group by

This commit is contained in:
54liuyao 2024-09-23 13:45:38 +08:00
parent 5639fd0baf
commit 2c24c52c80
2 changed files with 16 additions and 0 deletions

View File

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

View File

@ -99,6 +99,18 @@ if $rows == 0 then
return -1 return -1
endi endi
print ========== step2
sql CREATE DATABASE test2 VGROUPS 2;
sql use test2;
sql CREATE STABLE st (time TIMESTAMP, ca DOUBLE, cb DOUBLE, cc int) TAGS (ta VARCHAR(10) );
sql_error create stream stream_t1 trigger at_once ignore update 0 ignore expired 0 into streamtST as select time, count(*) c1, count(1) c2 from st partition by tbname group by ca,time ;
sql_error create stream stream_t1 trigger at_once ignore update 0 ignore expired 0 into streamtST as select _wstart, count(*) c1, count(1) c2 from st partition by tbname interval(10s) group by ca,time ;
_OVER: _OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check print =============== check