qiaojialin commented on a change in pull request #2016:
URL: https://github.com/apache/iotdb/pull/2016#discussion_r527704207



##########
File path: 
grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java
##########
@@ -133,31 +133,44 @@ public static void setTimestampRadioX(String 
timestampPrecision) {
   }
 
   public List<TimeValues> querySeriesInternal(String s, Pair<ZonedDateTime, 
ZonedDateTime> timeRange, String function) {
-      Long from = zonedCovertToLong(timeRange.left);
+    Long from = zonedCovertToLong(timeRange.left);
     Long to = zonedCovertToLong(timeRange.right);
     final long hours = Duration.between(timeRange.left, 
timeRange.right).toHours();
+
     String sql = String.format("SELECT %s FROM root.%s WHERE time > %d and 
time < %d",
         s.substring(s.lastIndexOf('.') + 1), s.substring(0, 
s.lastIndexOf('.')),
         from * timestampRadioX, to * timestampRadioX);
     String columnName = "root." + s;
-    if (isDownSampling && (hours > 1)) {
-      if (hours < 30 * 24 && hours > 24) {
-        interval = "1h";
-      } else if (hours > 30 * 24) {
-        interval = "1d";
-      }
+
+    String internalLocal = getInternal(hours);

Review comment:
       should the internal be interval?
   
   Interval means a time range, do you mean  an internal 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:
[email protected]


Reply via email to