未验证 提交 d66bb155 编写于 作者: H haojun Liao 提交者: GitHub

Merge pull request #5238 from taosdata/hotfix/TD-3019

[TD-3019]stddev and group by with same column issue
...@@ -1848,7 +1848,7 @@ void doAppendData(SInterResult* pInterResult, TAOS_ROW row, int32_t numOfCols, S ...@@ -1848,7 +1848,7 @@ void doAppendData(SInterResult* pInterResult, TAOS_ROW row, int32_t numOfCols, S
TSKEY key = INT64_MIN; TSKEY key = INT64_MIN;
for(int32_t i = 0; i < numOfCols; ++i) { for(int32_t i = 0; i < numOfCols; ++i) {
SSqlExpr* pExpr = tscSqlExprGet(pQueryInfo, i); SSqlExpr* pExpr = tscSqlExprGet(pQueryInfo, i);
if (TSDB_COL_IS_TAG(pExpr->colInfo.flag)) { if (TSDB_COL_IS_TAG(pExpr->colInfo.flag) || pExpr->functionId == TSDB_FUNC_PRJ) {
continue; continue;
} }
......
...@@ -763,3 +763,20 @@ endi ...@@ -763,3 +763,20 @@ endi
if $data01 != 1.414213562 then if $data01 != 1.414213562 then
return -1 return -1
endi endi
sql create stable st1 (ts timestamp, f1 int, f2 int) tags (id int);
sql create table tb1 using st1 tags(1);
sql insert into tb1 values (now, 1, 1);
sql select stddev(f1) from st1 group by f1;
if $rows != 1 then
return -1
endi
if $data00 != 0.000000000 then
return -1
endi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册