You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2018/10/18 14:19:26 UTC

[kylin] branch master updated: KYLIN-3635 Percentile calculation on Spark engine is wrong

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

shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a6ff1d  KYLIN-3635 Percentile calculation on Spark engine is wrong
5a6ff1d is described below

commit 5a6ff1d54f004e2e8c1bcaa09e64bebc036df8ef
Author: shaofengshi <sh...@apache.org>
AuthorDate: Thu Oct 18 19:21:16 2018 +0800

    KYLIN-3635 Percentile calculation on Spark engine is wrong
---
 .../org/apache/kylin/measure/percentile/PercentileMeasureType.java   | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileMeasureType.java
index 44bd213..60b3282 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileMeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/percentile/PercentileMeasureType.java
@@ -82,6 +82,11 @@ public class PercentileMeasureType extends MeasureType<PercentileCounter> {
                 }
                 return counter;
             }
+
+            @Override
+            public void reset() {
+                current = new PercentileCounter(dataType.getPrecision());
+            }
         };
     }