diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index b2ba7b539ccdc0c2c288d9b8f4bda4e88f92b744..94b4b45eda919e704f2551624b120081d903f50b 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -4863,7 +4863,7 @@ int32_t createProjectionExpr(SQueryInfo* pQueryInfo, STableMetaInfo* pTableMetaI } } - pse->colInfo.flag = TSDB_COL_NORMAL; + pse->colInfo.flag = pSource->base.colInfo.flag; //TSDB_COL_NORMAL; pse->resType = pSource->base.resType; pse->resBytes = pSource->base.resBytes; strncpy(pse->colInfo.name, pSource->base.aliasName, tListLen(pse->colInfo.name)); diff --git a/tests/script/general/parser/nestquery.sim b/tests/script/general/parser/nestquery.sim index 22f18179a418b5779993c91a17d62848674e1774..25cc8a4ee8774fc7b43234d54d06abdc56af61f8 100644 --- a/tests/script/general/parser/nestquery.sim +++ b/tests/script/general/parser/nestquery.sim @@ -181,7 +181,7 @@ endi sql_error select stddev(c1) from (select c1 from nest_tb0); sql_error select percentile(c1, 20) from (select * from nest_tb0); -sql_error select interp(c1) from (select * from nest_tb0); +#sql_error select interp(c1) from (select * from nest_tb0); sql_error select derivative(val, 1s, 0) from (select c1 val from nest_tb0); sql_error select twa(c1) from (select c1 from nest_tb0); sql_error select irate(c1) from (select c1 from nest_tb0); @@ -925,5 +925,18 @@ if $data00 != 24 then return -1 endi +sql select sum(a)/sum(b) from meters where ts >= '2021-09-30 15:00:00.000' and ts <= '2021-09-30 15:00:05.000' interval(1s) fill(null) group by area order by area; +if $rows != 12 then + return -1 +endi +if $data00 != @21-09-30 15:00:00.000@ then + return -1 +endi +if $data01 != NULL then + return -1 +endi +if $data02 != 0 then + return -1 +endi system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 2696b93acedd8c116dfd0922798012c27c8e8692..9a8f602901507bc4fc31d3902461394446a3067b 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -414,6 +414,7 @@ cd ../../../debug; make ./test.sh -f general/parser/between_and.sim ./test.sh -f general/parser/last_cache.sim ./test.sh -f unique/big/balance.sim +./test.sh -f general/parser/nestquery.sim ./test.sh -f general/parser/udf.sim ./test.sh -f general/parser/udf_dll.sim