xiaozhihong created IOTDB-5584:
----------------------------------

             Summary: [New feature]The resulte is incorrect when group by 
condition query
                 Key: IOTDB-5584
                 URL: https://issues.apache.org/jira/browse/IOTDB-5584
             Project: Apache IoTDB
          Issue Type: Bug
          Components: Core/Query, mpp-cluster
    Affects Versions: master, 1.1.0-SNAPSHOT
            Reporter: xiaozhihong
            Assignee: yang caiyin


Branch : master 

commit 415f68e36b88659b1e231be2b047483ea791337a

By default, start-standalone.sh, then enter CLI to execute SQL.

Like this:
{code:java}
IoTDB> select * from root.**;
+-----------------------------+-------------------------------------+-------------------------+------------------------------------+
|                         
Time|root.sg.beijing.car01.charging_status|root.sg.beijing.car01.soc|root.sg.beijing.car01.vehicle_status|
+-----------------------------+-------------------------------------+-------------------------+------------------------------------+
|1970-01-01T08:00:00.001+08:00|                                    1|           
          14.0|                                   1|
|1970-01-01T08:00:00.002+08:00|                                    1|           
          16.0|                                   1|
|1970-01-01T08:00:00.003+08:00|                                    0|           
          16.0|                                   1|
|1970-01-01T08:00:00.004+08:00|                                    0|           
          16.0|                                   1|
|1970-01-01T08:00:00.005+08:00|                                    1|           
          18.0|                                   1|
|1970-01-01T08:00:00.006+08:00|                                    1|           
          24.0|                                   1|
|1970-01-01T08:00:00.007+08:00|                                    1|           
          36.0|                                   1|
|1970-01-01T08:00:00.008+08:00|                                 null|           
          36.0|                                   1|
|1970-01-01T08:00:00.009+08:00|                                    1|           
          45.0|                                   1|
|1970-01-01T08:00:00.010+08:00|                                    1|           
          60.0|                                   1|
+-----------------------------+-------------------------------------+-------------------------+------------------------------------+
Total line number = 10
It costs 0.017s

IoTDB> select 
__endTime,max_time(charging_status),count(vehicle_status),last_value(soc) from 
root.** group by condition(soc>=24.0,KEEP<=15);
+-----------------------------+---------+-----------------------------------------------+-------------------------------------------+-------------------------------------+
|                         
Time|__endTime|max_time(root.sg.beijing.car01.charging_status)|count(root.sg.beijing.car01.vehicle_status)|last_value(root.sg.beijing.car01.soc)|
+-----------------------------+---------+-----------------------------------------------+-------------------------------------------+-------------------------------------+
|1970-01-01T08:00:00.000+08:00|        0|                                       
    null|                                          0|                           
      null|
|1970-01-01T08:00:00.006+08:00|       10|                                       
      10|                                          5|                           
      60.0|
+-----------------------------+---------+-----------------------------------------------+-------------------------------------------+-------------------------------------+
Total line number = 2
It costs 0.018s
 {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to