Merge pull request #28031 from taosdata/fix/TD-32251

fix(stream):not support group by
This commit is contained in:
Pan Wei 2024-09-24 13:50:01 +08:00 committed by GitHub
commit cf75cf4fe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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;
}

View File

@ -99,6 +99,18 @@ if $rows == 0 then
return -1
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 time, count(*) c1, count(1) c2 from st group by ca,time ;
_OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check