neuyilan commented on a change in pull request #2060:
URL: https://github.com/apache/iotdb/pull/2060#discussion_r524875355



##########
File path: 
server/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
##########
@@ -687,8 +687,10 @@ private void deduplicate(QueryPlan queryPlan, int 
fetchSize)
     if (queryPlan instanceof GroupByTimePlan) {
       GroupByTimePlan plan = (GroupByTimePlan) queryPlan;
       // the actual row number of group by query should be calculated from 
startTime, endTime and interval.
-      fetchSize = Math
-          .min((int) ((plan.getEndTime() - plan.getStartTime()) / 
plan.getInterval()), fetchSize);
+      long interval = (plan.getEndTime() - plan.getStartTime()) / 
plan.getInterval();

Review comment:
       What about the plan.getInterval() is zero?  does the code has been 
checked before?




----------------------------------------------------------------
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:
[email protected]


Reply via email to