haimeiguo commented on a change in pull request #2029:
URL: https://github.com/apache/iotdb/pull/2029#discussion_r528527846
##########
File path:
server/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java
##########
@@ -1411,6 +1418,16 @@ private Long parseDuration(String durationStr) {
i++;
unit += durationStr.charAt(i);
}
+ if (unit.toLowerCase().equals("mo")) {
+ //interval is by month, sliding step by default equals to interval
+ if (!isParsingSlidingStep) {
+ queryOp.setIntervalByMonth(true);
+ }
+ queryOp.setSlidingStepByMonth(true);
+ } else if (isParsingSlidingStep) {
+ //parsing sliding step value, and unit is not by month
+ queryOp.setSlidingStepByMonth(false);
+ }
Review comment:
Hi, thank you for your review.
In parseDuration clause, it converts the interval and sliding step in
milliseconds, also determines the unit for natural month aggregation. If I put
the parsing "mo" in enterGroupByTimeClause(). i think it will be redoing the
same thing.
----------------------------------------------------------------
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]