You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/23 00:48:31 UTC

[GitHub] [incubator-druid] drcrallen commented on issue #7486: regression: quantilesDoublesSketch returns null instead of empty array

drcrallen commented on issue #7486: regression: quantilesDoublesSketch returns null instead of empty array 
URL: https://github.com/apache/incubator-druid/issues/7486#issuecomment-485601317
 
 
   If I recall, all of the aggregators have a "default" state. Things like sum are 0, things like max are MIN_VALUE, things like min are MAX_VALUE. From the returned results the `quantilesDoublesSketch` returns 0 on empty. Would it ever make sense for the `quantilesDoublesSketchToQuantiles` to return an array of 0's? I suspect that will end up causing more confusion than clarity, and isn't really representative of the base state for quantiles.
   
   For `null` I can't think of any other aggregator which has `null` as the default state. If there is one it would provide precedence here to use `null` for "no data". 
   
   In other parts of the code `org.apache.druid.query.aggregation.histogram.ApproximateHistogram#getQuantiles` uses an array of `NaN`. But `org.apache.druid.query.aggregation.histogram.FixedBucketsHistogram#percentilesFloat` seems to return 0.  So handling this case is a bit all over the map :-/ 

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org