You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/01/28 07:33:17 UTC

[GitHub] [iotdb] jixuan1989 commented on a change in pull request #2571: bug fix - fetch size calculation error for group by month

jixuan1989 commented on a change in pull request #2571:
URL: https://github.com/apache/iotdb/pull/2571#discussion_r565873166



##########
File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
##########
@@ -668,6 +666,23 @@ private TSExecuteStatementResp internalExecuteQueryStatement(String statement, l
     }
   }
 
+  /*
+  calculate fetch size for group by time plan
+   */
+  private int getFetchSizeForGroupByTimePlan(GroupByTimePlan groupByTimePlan) {
+    int rows =  (int) ((groupByTimePlan.getEndTime() - groupByTimePlan.getStartTime()) / groupByTimePlan
+        .getInterval());
+    // edge case for group by months when starttime is in February
+    // ie. time range = [2020-02-02, 2020-03-02), interval = 1mo, rows will get 0

Review comment:
       The comments is not good as it may cause some misleading.
   
   rows gets 0 is caused by: the end time - the start time < the time interval. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org