cqzhang7 opened a new pull request, #11290:
URL: https://github.com/apache/iotdb/pull/11290

   ### support natural months with fixed time other (ie. 1mo1d) base on the 
original and handle natural year as 12month 
   Now the execution result is correct
   
   > IoTDB> select * from  root.hess.test.AK1407120700022.\*\*
   
+-----------------------------+-------------------------------------------------+---------------------------------------------------+
   |                         
Time|root.hess.test.AK1407120700022.testdata.epv_total|root.hess.test.AK1407120700022.testdata.eload_total|
   
+-----------------------------+-------------------------------------------------+---------------------------------------------------+
   |1970-01-31T00:00:00.000+08:00|                                             
10.0|                                               10.0|
   |1970-01-31T08:00:00.000+08:00|                                              
1.0|                                                1.0|
   |1970-02-27T23:59:59.999+08:00|                                             
20.0|                                               20.0|
   |1970-02-28T00:00:00.000+08:00|                                             
30.0|                                               30.0|
   |1970-02-28T07:59:59.999+08:00|                                              
2.0|                                                2.0|
   |1970-02-28T08:00:00.000+08:00|                                              
3.0|                                                3.0|
   |1970-03-30T23:59:59.999+08:00|                                             
40.0|                                               40.0|
   |1970-03-31T00:00:00.000+08:00|                                             
50.0|                                               50.0|
   |1970-03-31T07:59:59.999+08:00|                                              
4.0|                                                4.0|
   |1970-03-31T08:00:00.000+08:00|                                              
5.0|                                                5.0|
   
+-----------------------------+-------------------------------------------------+---------------------------------------------------+
   Total line number = 10
   It costs 0.038s
   IoTDB>  select  SUM(epv_total) as pv,SUM(eload_total) as load from 
root.hess.\*\*.AK1407120700022.\*\* group by ([1970-02-28T08:00:00, 
1970-05-31), 1mo , 2mo)
   +-----------------------------+----+----+
   |                         Time|  pv|load|
   +-----------------------------+----+----+
   |1970-02-28T08:00:00.000+08:00|97.0|97.0|
   |1970-04-30T08:00:00.000+08:00|null|null|
   +-----------------------------+----+----+
   Total line number = 2
   It costs 0.034s
   IoTDB>  select  SUM(epv_total) as pv,SUM(eload_total) as load from 
root.hess.\*\*.AK1407120700022.\*\* group by ([1970-02-28T08:00:00, 
1970-05-31), 1mo , 1mo)
   +-----------------------------+----+----+
   |                         Time|  pv|load|
   +-----------------------------+----+----+
   |1970-02-28T08:00:00.000+08:00|97.0|97.0|
   |1970-03-31T08:00:00.000+08:00| 5.0| 5.0|
   |1970-04-30T08:00:00.000+08:00|null|null|
   +-----------------------------+----+----+
   Total line number = 3
   It costs 0.034s
   IoTDB> select  SUM(epv_total) as pv,SUM(eload_total) as load from 
root.hess.\*\*.AK1407120700022.\*\* group by ([1970-02-28T08:00:00, 
1970-05-31), 1mo1ms , 1mo1ms)
   +-----------------------------+-----+-----+
   |                         Time|   pv| load|
   +-----------------------------+-----+-----+
   |1970-02-28T08:00:00.000+08:00|102.0|102.0|
   |1970-03-31T08:00:00.001+08:00| null| null|
   |1970-04-30T08:00:00.002+08:00| null| null|
   +-----------------------------+-----+-----+
   Total line number = 3
   It costs 0.022s
   IoTDB> select  SUM(epv_total) as pv,SUM(eload_total) as load from 
root.hess.\*\*.AK1407120700022.\*\* group by ([1970-02-28T08:00:00, 
1970-05-31), 1mo1ms , 1mo)
   +-----------------------------+-----+-----+
   |                         Time|   pv| load|
   +-----------------------------+-----+-----+
   |1970-02-28T08:00:00.000+08:00|102.0|102.0|
   |1970-03-31T08:00:00.000+08:00|  5.0|  5.0|
   |1970-04-30T08:00:00.000+08:00| null| null|
   +-----------------------------+-----+-----+
   
   IoTDB> select  SUM(epv_total) as pv,SUM(eload_total) as load from 
root.hess.\*\*.AK1407120700022.\*\* group by ([1970-02-28T08:00:00, 
1970-05-31), 1mo , 1mo1ms)
   +-----------------------------+----+----+
   |                         Time|  pv|load|
   +-----------------------------+----+----+
   |1970-02-28T08:00:00.000+08:00|97.0|97.0|
   |1970-03-31T08:00:00.001+08:00|null|null|
   |1970-04-30T08:00:00.002+08:00|null|null|
   +-----------------------------+----+----+


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to