[jira] [Commented] (IOTDB-1125) set ttl 与flush一起使用,顺序tsfile被delete导致查询Msg: 500: bitIndex < 0: -2147483648
[ https://issues.apache.org/jira/browse/IOTDB-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272618#comment-17272618 ] Xiangdong Huang commented on IOTDB-1125: > 大概100秒后再次执行查询,查询结果为空。过期的记录不可见,表现正确。 >执行FLUSH >可以看到data/data/sequence/root.db_0/0下的tsfile文件消失 >unset ttl to root.db_0; >再次执行查询 >select * from root.db_0.tab0; >查询结果为空,应该可以查询到,因为已经取消ttl。 I think the behavior is CORRECT as TTL means you have really deleted the data. All expired data is not impacted by "unset TTL". However, you can test these two cases: (1) set ttl = 100s; write data points; 20s (I mean, less than 100s) later, unset TTL; then the data should not be deleted; (2) set ttl = 100s; write data points; 120s (I mean, larger than 100s) later, unset TTL; (DO NOT call FLUSH, and make sure the memory data is not flushed to the disk) then the data should not be deleted; > select * from root.db_0.tab0; > 报错 What is this test case for? Is this a bug caused by TTL, or just by delete? > set ttl 与flush一起使用,顺序tsfile被delete导致查询Msg: 500: bitIndex < 0: -2147483648 > - > > Key: IOTDB-1125 > URL: https://issues.apache.org/jira/browse/IOTDB-1125 > Project: Apache IoTDB > Issue Type: Bug > Components: Server > Environment: 0.11.3-SNAPSHOT >Reporter: 刘珍 >Assignee: Chao Wang >Priority: Major > Attachments: image-2021-01-25-18-13-30-909.png, > image-2021-01-25-18-13-34-397.png, image-2021-01-25-18-15-40-631.png, > log_error.log, log_info.log > > > 干净的IoTDB数据库 > create timeseries root.db_0.tab0.salary with datatype=INT64,encoding=REGULAR ; > set ttl to root.db_0 10; --过期时间100秒 > insert 2条记录,时间为当前时间 > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T18:01:01.000+08:00,1200); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T18:01:02.000+08:00,1200); > 执行查询,可以查询到insert的2条记录。 > select * from root.db_0.tab0; > !image-2021-01-25-18-13-34-397.png! > 大概100秒后再次执行查询,查询结果为空。过期的记录不可见,表现正确。 > 执行 > FLUSH > 可以看到data/data/sequence/root.db_0/0下的tsfile文件消失 > unset ttl to root.db_0; > 再次执行查询 > select * from root.db_0.tab0; > 查询结果为空,应该可以查询到,因为已经取消ttl。 > delete from root.db_0.tab0; > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:01.000+08:00,1200); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:02.000+08:00,1100); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:03.000+08:00,1000); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:04.000+08:00,2200); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:05.000+08:00,1300); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:06.000+08:00,1400); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:07.000+08:00,1500); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:08.000+08:00,1600); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:09.000+08:00,1700); > insert into root.db_0.tab0(time ,salary) > values(2021-01-25T17:36:10.000+08:00,1800); > flush; > select * from root.db_0.tab0; > 报错 > !image-2021-01-25-18-15-40-631.png! > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (IOTDB-1130) select * .. .group by 不报错
刘珍 created IOTDB-1130: - Summary: select * .. .group by 不报错 Key: IOTDB-1130 URL: https://issues.apache.org/jira/browse/IOTDB-1130 Project: Apache IoTDB Issue Type: Bug Environment: 0.11.3-SNAPSHOT Reporter: 刘珍 select * from root.group_0.d_0 group by ([2018-09-20T00:00:00.000+08:00, 2018-09-30T00:00:00.000+08:00),1d) 不报错。 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Reopened] (IOTDB-1081) New TsFile Format for 0.12
[ https://issues.apache.org/jira/browse/IOTDB-1081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Haonan Hou reopened IOTDB-1081: --- > New TsFile Format for 0.12 > -- > > Key: IOTDB-1081 > URL: https://issues.apache.org/jira/browse/IOTDB-1081 > Project: Apache IoTDB > Issue Type: New Feature > Components: Core/TsFile >Reporter: Zesong Sun >Assignee: Yuan Tian >Priority: Major > Labels: pull-request-available > Fix For: 0.12.0 > > > We find that the former tsfile format waste some disk space, some information > was stored duplicately and some legacy fields are no longer useful. > So a new TsFile format should be designed to make our tsfile more dense. > Design: https://cwiki.apache.org/confluence/display/IOTDB/New+TsFile+Format -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (IOTDB-1129) Correct `calculateLength` logic according New TsFile Format for 0.12
[ https://issues.apache.org/jira/browse/IOTDB-1129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] sunjincheng reassigned IOTDB-1129: -- Assignee: sunjincheng > Correct `calculateLength` logic according New TsFile Format for 0.12 > > > Key: IOTDB-1129 > URL: https://issues.apache.org/jira/browse/IOTDB-1129 > Project: Apache IoTDB > Issue Type: Bug > Components: Client/Java, Client/Others, Client/Python >Affects Versions: master branch >Reporter: sunjincheng >Assignee: sunjincheng >Priority: Major > Labels: pull-request-available > > We should update the `calculate length` for > [https://github.com/apache/iotdb/blob/660a10935bdcfc3e895be6c3b712844974bf140a/session/src/main/java/org/apache/iotdb/session/Session.java#L1122] > and > > [https://github.com/apache/iotdb/pull/2184/files#diff-4ed975b7cb9b3ae816701cadc9603aac2b7a9d8c39299fe157956b72ef200f66R379] > at the same time. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IOTDB-1128) 按照自然月份的降频聚合查询,结果集中的起始时间不正确
[ https://issues.apache.org/jira/browse/IOTDB-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272126#comment-17272126 ] Haonan Hou commented on IOTDB-1128: --- 0.11 doesn't support group by natural month. This is also a 0.12 feature. > 按照自然月份的降频聚合查询,结果集中的起始时间不正确 > -- > > Key: IOTDB-1128 > URL: https://issues.apache.org/jira/browse/IOTDB-1128 > Project: Apache IoTDB > Issue Type: Bug > Environment: 0.11.3-SNAPSHOT >Reporter: 刘珍 >Priority: Minor > > 测试用例,有问题的sql在最后1条: > create timeseries root.db_1.tab1.temp with datatype=INT64,encoding=REGULAR ; > insert into root.db_1.tab1(time,temp) values(2017-11-01T00:00:00,110101); > insert into root.db_1.tab1(time,temp) values(2017-11-01T01:00:00,110102); > insert into root.db_1.tab1(time,temp) values(2017-11-01T02:00:00,110103); > insert into root.db_1.tab1(time,temp) values(2017-11-01T03:00:00,110104); > insert into root.db_1.tab1(time,temp) values(2017-11-01T04:00:00,110105); > insert into root.db_1.tab1(time,temp) values(2017-11-01T05:00:00,110106); > insert into root.db_1.tab1(time,temp) values(2017-11-01T00:00:00,110101); > insert into root.db_1.tab1(time,temp) values(2017-11-01T01:00:00,110102); > insert into root.db_1.tab1(time,temp) values(2017-11-01T02:00:00,110103); > insert into root.db_1.tab1(time,temp) values(2017-11-01T03:00:00,110104); > insert into root.db_1.tab1(time,temp) values(2017-11-01T04:00:00,110105); > insert into root.db_1.tab1(time,temp) values(2017-11-01T05:00:00,110106); > insert into root.db_1.tab1(time,temp) values(2017-11-02T00:00:00,110201); > insert into root.db_1.tab1(time,temp) values(2017-11-02T01:00:00,110202); > insert into root.db_1.tab1(time,temp) values(2017-11-02T02:00:00,110203); > insert into root.db_1.tab1(time,temp) values(2017-11-02T03:00:00,110204); > insert into root.db_1.tab1(time,temp) values(2017-11-02T04:00:00,110205); > insert into root.db_1.tab1(time,temp) values(2017-11-02T05:00:00,110206); > insert into root.db_1.tab1(time,temp) values(2017-11-03T00:00:00,110301); > insert into root.db_1.tab1(time,temp) values(2017-11-03T01:00:00,110302); > insert into root.db_1.tab1(time,temp) values(2017-11-03T02:00:00,110303); > insert into root.db_1.tab1(time,temp) values(2017-11-03T03:00:00,110304); > insert into root.db_1.tab1(time,temp) values(2017-11-03T04:00:00,110305); > insert into root.db_1.tab1(time,temp) values(2017-11-03T05:00:00,110306); > insert into root.db_1.tab1(time,temp) values(2017-11-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2017-11-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2017-11-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2017-11-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2017-11-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2017-11-04T05:00:00,110406); > select count(temp), max_value(temp) from root.db_1.tab1 group by > ([2017-11-01T00:00:00, 2017-11-05T03:18:10.000+08:00),1d); > select count(temp), max_value(temp) from root.db_1.tab1 group by > ([2017-11-01T00:00:00, 2017-11-05T03:18:10.000+08:00),3h,1d); > 按照自然月份的降频聚合查询 > insert into root.db_1.tab1(time,temp) values(2017-12-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2017-12-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2017-12-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2017-12-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2017-12-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2017-12-04T05:00:00,110406); > insert into root.db_1.tab1(time,temp) values(2018-01-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2018-01-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2018-01-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2018-01-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2018-01-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2018-01-04T05:00:00,110406); > insert into root.db_1.tab1(time,temp) values(2018-01-04T06:00:00,110407); > insert into root.db_1.tab1(time,temp) values(2018-02-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2018-02-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2018-02-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2018-02-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2018-02-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2018-02-04T05:00:00,110406); > select count(temp), max_value(temp) from root.db_1.tab1 where time > > 2017-11-01T00:00:00 group by ([2017-11-01T00:00:00,2018-02-04T05:00:00),1mo, > 2mo); > +-+--+-
[jira] [Commented] (IOTDB-1127) select数学函数报语法错误Msg: 401:
[ https://issues.apache.org/jira/browse/IOTDB-1127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272122#comment-17272122 ] Haonan Hou commented on IOTDB-1127: --- 0.12 works well. !Screen Shot 2021-01-26 at 10.28.48 PM.png! > select数学函数报语法错误Msg: 401: > - > > Key: IOTDB-1127 > URL: https://issues.apache.org/jira/browse/IOTDB-1127 > Project: Apache IoTDB > Issue Type: Bug > Components: Server > Environment: 0.11.3-SNAPSHOT| >Reporter: 刘珍 >Priority: Minor > Attachments: Screen Shot 2021-01-26 at 10.28.48 PM.png > > > create timeseries root.db_1.tab1.salary with datatype=INT64,encoding=PLAIN ; > insert into root.db_1.tab1(time,salary) values(1000,3000); > select salary,sin(salary) from root.db_1.tab1; > Msg: 401: line 1:17 mismatched input '(' expecting \{FROM, ',', '.'} > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IOTDB-1124) SHOW LATEST TIMESERIES显示顺序不正确
[ https://issues.apache.org/jira/browse/IOTDB-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272120#comment-17272120 ] Haonan Hou commented on IOTDB-1124: --- * SHOW LATEST TIMESERIES 表示查询出的时间序列需要按照最近插入时间戳降序排列 需要注意的是,当查询路径不存在时,系统会返回0条时间序列。 这里按照是按照insert data的时间戳进行排序,不是按照create timeseries的先后顺序。 > SHOW LATEST TIMESERIES显示顺序不正确 > - > > Key: IOTDB-1124 > URL: https://issues.apache.org/jira/browse/IOTDB-1124 > Project: Apache IoTDB > Issue Type: Bug > Components: Server > Environment: version 0.11.3-SNAPSHOT >Reporter: 刘珍 >Priority: Minor > Attachments: image-2021-01-25-16-22-14-827.png, > image-2021-01-25-16-22-52-738.png > > > 复现流程: > cli连接IoTDB每次执行1条SQL: > create timeseries root.db_1.tab1.status with datatype=BOOLEAN,encoding=PLAIN > ; > create timeseries root.db_1.tab2.temperature with > datatype=FLOAT,encoding=PLAIN ; > create timeseries root.db_1.tab3.hardware with datatype=TEXT,encoding=PLAIN ; > create timeseries root.db_1.tab4.price with datatype=DOUBLE,encoding=PLAIN ; > create timeseries root.db_1.tab5.age with datatype=INT32,encoding=REGULAR ; > create timeseries root.db_1.tab6.salary with datatype=INT64,encoding=REGULAR ; > SHOW LATEST TIMESERIES; > 结果为: > > 最近插入时间戳在结果集下面,有序。 > !image-2021-01-25-16-22-52-738.png! > 再执行 > create timeseries root.db_2.tab0.salary with datatype=INT64,encoding=REGULAR ; > SHOW LATEST TIMESERIES; --查询结果有序 > create timeseries root.db_0.tab0.salary with datatype=INT64,encoding=REGULAR ; > SHOW LATEST TIMESERIES; > !image-2021-01-25-16-22-14-827.png! > 最近插入的时间戳在结果集的第一行,乱序。 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (IOTDB-1129) Correct `calculateLength` logic according New TsFile Format for 0.12
sunjincheng created IOTDB-1129: -- Summary: Correct `calculateLength` logic according New TsFile Format for 0.12 Key: IOTDB-1129 URL: https://issues.apache.org/jira/browse/IOTDB-1129 Project: Apache IoTDB Issue Type: Bug Components: Client/Java Affects Versions: 0.11.2 Reporter: sunjincheng We should update the `calculate length` for [https://github.com/apache/iotdb/blob/660a10935bdcfc3e895be6c3b712844974bf140a/session/src/main/java/org/apache/iotdb/session/Session.java#L1122] and [https://github.com/apache/iotdb/pull/2184/files#diff-4ed975b7cb9b3ae816701cadc9603aac2b7a9d8c39299fe157956b72ef200f66R379] at the same time. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (IOTDB-1128) 按照自然月份的降频聚合查询,结果集中的起始时间不正确
[ https://issues.apache.org/jira/browse/IOTDB-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17271989#comment-17271989 ] Haimei Guo commented on IOTDB-1128: --- 当前版本月聚合是按照30天划分时间间隔的。新的版本,月聚合会改为按照自然月份聚合。 自然月聚合的pr 链接:https://github.com/apache/iotdb/pull/2029 > 按照自然月份的降频聚合查询,结果集中的起始时间不正确 > -- > > Key: IOTDB-1128 > URL: https://issues.apache.org/jira/browse/IOTDB-1128 > Project: Apache IoTDB > Issue Type: Bug > Environment: 0.11.3-SNAPSHOT >Reporter: 刘珍 >Priority: Minor > > 测试用例,有问题的sql在最后1条: > create timeseries root.db_1.tab1.temp with datatype=INT64,encoding=REGULAR ; > insert into root.db_1.tab1(time,temp) values(2017-11-01T00:00:00,110101); > insert into root.db_1.tab1(time,temp) values(2017-11-01T01:00:00,110102); > insert into root.db_1.tab1(time,temp) values(2017-11-01T02:00:00,110103); > insert into root.db_1.tab1(time,temp) values(2017-11-01T03:00:00,110104); > insert into root.db_1.tab1(time,temp) values(2017-11-01T04:00:00,110105); > insert into root.db_1.tab1(time,temp) values(2017-11-01T05:00:00,110106); > insert into root.db_1.tab1(time,temp) values(2017-11-01T00:00:00,110101); > insert into root.db_1.tab1(time,temp) values(2017-11-01T01:00:00,110102); > insert into root.db_1.tab1(time,temp) values(2017-11-01T02:00:00,110103); > insert into root.db_1.tab1(time,temp) values(2017-11-01T03:00:00,110104); > insert into root.db_1.tab1(time,temp) values(2017-11-01T04:00:00,110105); > insert into root.db_1.tab1(time,temp) values(2017-11-01T05:00:00,110106); > insert into root.db_1.tab1(time,temp) values(2017-11-02T00:00:00,110201); > insert into root.db_1.tab1(time,temp) values(2017-11-02T01:00:00,110202); > insert into root.db_1.tab1(time,temp) values(2017-11-02T02:00:00,110203); > insert into root.db_1.tab1(time,temp) values(2017-11-02T03:00:00,110204); > insert into root.db_1.tab1(time,temp) values(2017-11-02T04:00:00,110205); > insert into root.db_1.tab1(time,temp) values(2017-11-02T05:00:00,110206); > insert into root.db_1.tab1(time,temp) values(2017-11-03T00:00:00,110301); > insert into root.db_1.tab1(time,temp) values(2017-11-03T01:00:00,110302); > insert into root.db_1.tab1(time,temp) values(2017-11-03T02:00:00,110303); > insert into root.db_1.tab1(time,temp) values(2017-11-03T03:00:00,110304); > insert into root.db_1.tab1(time,temp) values(2017-11-03T04:00:00,110305); > insert into root.db_1.tab1(time,temp) values(2017-11-03T05:00:00,110306); > insert into root.db_1.tab1(time,temp) values(2017-11-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2017-11-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2017-11-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2017-11-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2017-11-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2017-11-04T05:00:00,110406); > select count(temp), max_value(temp) from root.db_1.tab1 group by > ([2017-11-01T00:00:00, 2017-11-05T03:18:10.000+08:00),1d); > select count(temp), max_value(temp) from root.db_1.tab1 group by > ([2017-11-01T00:00:00, 2017-11-05T03:18:10.000+08:00),3h,1d); > 按照自然月份的降频聚合查询 > insert into root.db_1.tab1(time,temp) values(2017-12-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2017-12-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2017-12-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2017-12-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2017-12-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2017-12-04T05:00:00,110406); > insert into root.db_1.tab1(time,temp) values(2018-01-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2018-01-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2018-01-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2018-01-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2018-01-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2018-01-04T05:00:00,110406); > insert into root.db_1.tab1(time,temp) values(2018-01-04T06:00:00,110407); > insert into root.db_1.tab1(time,temp) values(2018-02-04T00:00:00,110401); > insert into root.db_1.tab1(time,temp) values(2018-02-04T01:00:00,110402); > insert into root.db_1.tab1(time,temp) values(2018-02-04T02:00:00,110403); > insert into root.db_1.tab1(time,temp) values(2018-02-04T03:00:00,110404); > insert into root.db_1.tab1(time,temp) values(2018-02-04T04:00:00,110405); > insert into root.db_1.tab1(time,temp) values(2018-02-04T05:00:00,110406); > select count(temp), max_value(temp) from root.db_1.tab1 where time > > 2017-11-01T00:00:00 group by ([2017-11-01T00:00:00,2018-02-04T05:00:00),1mo, > 2mo); > +-+--+--
[jira] [Created] (IOTDB-1128) 按照自然月份的降频聚合查询,结果集中的起始时间不正确
刘珍 created IOTDB-1128: - Summary: 按照自然月份的降频聚合查询,结果集中的起始时间不正确 Key: IOTDB-1128 URL: https://issues.apache.org/jira/browse/IOTDB-1128 Project: Apache IoTDB Issue Type: Bug Environment: 0.11.3-SNAPSHOT Reporter: 刘珍 测试用例,有问题的sql在最后1条: create timeseries root.db_1.tab1.temp with datatype=INT64,encoding=REGULAR ; insert into root.db_1.tab1(time,temp) values(2017-11-01T00:00:00,110101); insert into root.db_1.tab1(time,temp) values(2017-11-01T01:00:00,110102); insert into root.db_1.tab1(time,temp) values(2017-11-01T02:00:00,110103); insert into root.db_1.tab1(time,temp) values(2017-11-01T03:00:00,110104); insert into root.db_1.tab1(time,temp) values(2017-11-01T04:00:00,110105); insert into root.db_1.tab1(time,temp) values(2017-11-01T05:00:00,110106); insert into root.db_1.tab1(time,temp) values(2017-11-01T00:00:00,110101); insert into root.db_1.tab1(time,temp) values(2017-11-01T01:00:00,110102); insert into root.db_1.tab1(time,temp) values(2017-11-01T02:00:00,110103); insert into root.db_1.tab1(time,temp) values(2017-11-01T03:00:00,110104); insert into root.db_1.tab1(time,temp) values(2017-11-01T04:00:00,110105); insert into root.db_1.tab1(time,temp) values(2017-11-01T05:00:00,110106); insert into root.db_1.tab1(time,temp) values(2017-11-02T00:00:00,110201); insert into root.db_1.tab1(time,temp) values(2017-11-02T01:00:00,110202); insert into root.db_1.tab1(time,temp) values(2017-11-02T02:00:00,110203); insert into root.db_1.tab1(time,temp) values(2017-11-02T03:00:00,110204); insert into root.db_1.tab1(time,temp) values(2017-11-02T04:00:00,110205); insert into root.db_1.tab1(time,temp) values(2017-11-02T05:00:00,110206); insert into root.db_1.tab1(time,temp) values(2017-11-03T00:00:00,110301); insert into root.db_1.tab1(time,temp) values(2017-11-03T01:00:00,110302); insert into root.db_1.tab1(time,temp) values(2017-11-03T02:00:00,110303); insert into root.db_1.tab1(time,temp) values(2017-11-03T03:00:00,110304); insert into root.db_1.tab1(time,temp) values(2017-11-03T04:00:00,110305); insert into root.db_1.tab1(time,temp) values(2017-11-03T05:00:00,110306); insert into root.db_1.tab1(time,temp) values(2017-11-04T00:00:00,110401); insert into root.db_1.tab1(time,temp) values(2017-11-04T01:00:00,110402); insert into root.db_1.tab1(time,temp) values(2017-11-04T02:00:00,110403); insert into root.db_1.tab1(time,temp) values(2017-11-04T03:00:00,110404); insert into root.db_1.tab1(time,temp) values(2017-11-04T04:00:00,110405); insert into root.db_1.tab1(time,temp) values(2017-11-04T05:00:00,110406); select count(temp), max_value(temp) from root.db_1.tab1 group by ([2017-11-01T00:00:00, 2017-11-05T03:18:10.000+08:00),1d); select count(temp), max_value(temp) from root.db_1.tab1 group by ([2017-11-01T00:00:00, 2017-11-05T03:18:10.000+08:00),3h,1d); 按照自然月份的降频聚合查询 insert into root.db_1.tab1(time,temp) values(2017-12-04T00:00:00,110401); insert into root.db_1.tab1(time,temp) values(2017-12-04T01:00:00,110402); insert into root.db_1.tab1(time,temp) values(2017-12-04T02:00:00,110403); insert into root.db_1.tab1(time,temp) values(2017-12-04T03:00:00,110404); insert into root.db_1.tab1(time,temp) values(2017-12-04T04:00:00,110405); insert into root.db_1.tab1(time,temp) values(2017-12-04T05:00:00,110406); insert into root.db_1.tab1(time,temp) values(2018-01-04T00:00:00,110401); insert into root.db_1.tab1(time,temp) values(2018-01-04T01:00:00,110402); insert into root.db_1.tab1(time,temp) values(2018-01-04T02:00:00,110403); insert into root.db_1.tab1(time,temp) values(2018-01-04T03:00:00,110404); insert into root.db_1.tab1(time,temp) values(2018-01-04T04:00:00,110405); insert into root.db_1.tab1(time,temp) values(2018-01-04T05:00:00,110406); insert into root.db_1.tab1(time,temp) values(2018-01-04T06:00:00,110407); insert into root.db_1.tab1(time,temp) values(2018-02-04T00:00:00,110401); insert into root.db_1.tab1(time,temp) values(2018-02-04T01:00:00,110402); insert into root.db_1.tab1(time,temp) values(2018-02-04T02:00:00,110403); insert into root.db_1.tab1(time,temp) values(2018-02-04T03:00:00,110404); insert into root.db_1.tab1(time,temp) values(2018-02-04T04:00:00,110405); insert into root.db_1.tab1(time,temp) values(2018-02-04T05:00:00,110406); select count(temp), max_value(temp) from root.db_1.tab1 where time > 2017-11-01T00:00:00 group by ([2017-11-01T00:00:00,2018-02-04T05:00:00),1mo, 2mo); +-+--+--+ | Time|count(root.db_1.tab1.temp)|max_value(root.db_1.tab1.temp)| +-+--+--+ |2017-11-01T00:00:00.000+08:00| 23| 110406| |2017-12-31T00:00:00.000+08:00| 7| 110407| +-+--+--+ Total line number = 2 2017-12-31T00:00:00.000+08:00这个起始时间不正确,应该是2018-01-01 -- This message