jon-wei commented on a change in pull request #6581: Moments Sketch custom
aggregator
URL: https://github.com/apache/incubator-druid/pull/6581#discussion_r246161523
##########
File path:
extensions-contrib/momentsketch/src/main/java/org/apache/druid/query/aggregation/momentsketch/MomentSketchWrapper.java
##########
@@ -103,6 +107,8 @@ public MomentSolver getSolver()
public double[] getQuantiles(double[] fractions)
{
MomentSolver ms = new MomentSolver(data);
+ // Constants here are chosen to yield maximum precision while keeping
solve times ~1ms on 2Ghz cpu
+ // Grid size can be increased if longer solve times are acceptable
Review comment:
When multiple quantiles are requested, the estimation could be more
efficient if `MomentSolver` had a `getQuantiles` method that accepts an array,
the `cdf` could be reused and you would only need one pass of the latter for
loop.
https://github.com/stanford-futuredata/momentsketch/blob/master/momentsolver/src/main/java/com/github/stanfordfuturedata/momentsketch/MomentSolver.java#L88
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]