You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/09/12 03:11:44 UTC

[skywalking] branch bugfix/double-should-be-long created (now ef488a0)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a change to branch bugfix/double-should-be-long
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at ef488a0  Fix that `sortMetrics` should only return `long` not `double`

This branch includes the following new commits:

     new ef488a0  Fix that `sortMetrics` should only return `long` not `double`

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[skywalking] 01/01: Fix that `sortMetrics` should only return `long` not `double`

Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch bugfix/double-should-be-long
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit ef488a03c0ba20f10f6fb565212356303e54263d
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Sun Sep 12 11:11:26 2021 +0800

    Fix that `sortMetrics` should only return `long` not `double`
---
 .../storage/plugin/elasticsearch/query/AggregationQueryEsDAO.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AggregationQueryEsDAO.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AggregationQueryEsDAO.java
index 2f67266..dc831b5 100644
--- a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AggregationQueryEsDAO.java
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/query/AggregationQueryEsDAO.java
@@ -118,7 +118,7 @@ public class AggregationQueryEsDAO extends EsDAO implements IAggregationQueryDAO
             SelectedRecord record = new SelectedRecord();
             record.setId((String) termsBucket.get("key"));
             Map<String, Object> value = (Map<String, Object>) termsBucket.get(valueColumnName);
-            record.setValue(String.valueOf(value.get("value")));
+            record.setValue(String.valueOf(((Number) value.get("value")).longValue()));
             topNList.add(record);
         }