Skip to content

Commit

Permalink
[warehouse] bugfix monitoring metric instances are displayed as NULL …
Browse files Browse the repository at this point in the history
…when no instance (#615)
  • Loading branch information
tomsun28 authored Feb 3, 2023
1 parent 68872ee commit 1bfd670
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public Map<String, List<Value>> getHistoryMetricData(Long monitorId, String app,
Timestamp ts = resultSet.getTimestamp(1);
String instanceValue = resultSet.getString(2);
if (instanceValue == null || "".equals(instanceValue)) {
instanceValue = "NULL";
instanceValue = "";
}
double value = resultSet.getDouble(3);
String strValue = new BigDecimal(value).setScale(4, RoundingMode.HALF_UP).stripTrailingZeros().toPlainString();
Expand Down Expand Up @@ -338,7 +338,7 @@ public Map<String, List<Value>> getHistoryIntervalMetricData(Long monitorId, Str
metric, metric, metric, metric, table, instanceValue, history);
log.debug(selectSql);
if ("''".equals(instanceValue)) {
instanceValue = "NULL";
instanceValue = "";
}
List<Value> values = instanceValuesMap.computeIfAbsent(instanceValue, k -> new LinkedList<>());
Connection connection = null;
Expand Down

0 comments on commit 1bfd670

Please sign in to comment.