[ 
https://issues.apache.org/jira/browse/KYLIN-3635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16655291#comment-16655291
 ] 

ASF GitHub Bot commented on KYLIN-3635:
---------------------------------------

shaofengshi closed pull request #294: KYLIN-3635 Percentile calculation on 
Spark engine is wrong
URL: https://github.com/apache/kylin/pull/294
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 44bd2133b2..60b3282c71 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 PercentileCounter valueOf(String[] values, 
MeasureDesc measureDesc,
                 }
                 return counter;
             }
+
+            @Override
+            public void reset() {
+                current = new PercentileCounter(dataType.getPrecision());
+            }
         };
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Percentile calculation on Spark engine is wrong
> -----------------------------------------------
>
>                 Key: KYLIN-3635
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3635
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: v2.3.0, v2.3.1, v2.4.0, v2.3.2, v2.4.1, v2.5.0
>            Reporter: Shaofeng SHI
>            Priority: Major
>
> As titled; Received reporting that percentile result is wrong when using 
> Spark engine. Checked the code and found the object was reused and not reset, 
> the problem won't happen on normal MR as it would be serialized before next 
> call, but would be a problem on Spark, as the object was cached in-memory and 
> be serialized later.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to