[ 
https://issues.apache.org/jira/browse/IOTDB-3600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xiaozhihong reassigned IOTDB-3600:
----------------------------------

      Sprint: 2022-6-Cluster
    Assignee: Minghui Liu

> Aggregate nested expression query verification query type is wrong
> ------------------------------------------------------------------
>
>                 Key: IOTDB-3600
>                 URL: https://issues.apache.org/jira/browse/IOTDB-3600
>             Project: Apache IoTDB
>          Issue Type: Bug
>          Components: Core/Cluster, mpp-cluster
>    Affects Versions: 0.14.0-SNAPSHOT
>            Reporter: xiaozhihong
>            Assignee: Minghui Liu
>            Priority: Major
>         Attachments: image-2022-06-22-15-24-11-784.png
>
>
> When executing aggregate nested expressions, the validation prompts that 
> aggregate queries and native queries are not supported.
> {code:java}
> IoTDB> select avg(s1),sin(avg(s2)),avg(s1) + 1,-sum(s2),avg(s1) + sum(s2) 
> from root.sg.d1;
> Msg: 416: Raw data and aggregation hybrid query is not supported.
>  {code}
> !image-2022-06-22-15-24-11-784.png|width=572,height=205!
>  
> Execute SQL:
> {code:java}
> create storage group root.sg;
> create timeseries root.sg.d1.s1 with datatype=float,encoding=RLE;
> create timeseries root.sg.d1.s2 with datatype=double,encoding=RLE;
> create timeseries root.sg.d1.s3 with datatype=BOOLEAN,encoding=RLE;
> create timeseries root.sg.d1.s4 with datatype=TEXT,encoding=PLAIN;
> create timeseries root.sg.d1.s5 with datatype=INT32,encoding=RLE;
> create timeseries root.sg.d1.s6 with datatype=INT64,encoding=RLE;
> create timeseries root.sg.d2.s1 with datatype=INT64,encoding=RLE;
> create timeseries root.sg.d2.s2 with datatype=float,encoding=RLE;
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(1,1.1,2.2,TRUE,'warn:1731',20);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(20,2.2,3.3,FALSE,'warn:-8721',14);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(35,2.5,2.2,TRUE,'error:-37229',22);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(49,2.6,3.3,FALSE,'warn:1731',14);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(55,1.1,2.2,TRUE,'warn:1731',20);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(63,2.2,3.3,FALSE,'warn:-8721',14);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(79,2.5,2.2,TRUE,'warn:1731',22);
> insert into root.sg.d1(time,s1,s2,s3,s4,s6) 
> values(80,2.6,3.3,FALSE,'error:-37229',14);
> insert into root.sg.d2(time,s1) values(1,12);
> insert into root.sg.d2(time,s1) values(2,32);
> insert into root.sg.d2(time,s1) values(1607603775000,1531604122307244742);
> insert into root.sg.d2(time,s1) values(1607603776000,-8581625725655917595);
> select avg(s1),sin(avg(s2)),avg(s1) + 1,-sum(s2),avg(s1) + sum(s2) from 
> root.sg.d1;
> select avg(*), (avg(*) + 1) * 3 / 2 -1 from root.sg.d2; {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to