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 2020/11/18 07:41:48 UTC

[GitHub] [iotdb] w169q169 commented on a change in pull request #2016: fix grafana bug

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



##########
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:
       The value of internal is global in the past version




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