Moment Sketches for Approximate Quantiles module

    To use this Apache Druid extension, make sure you include the extension in your config file:

    The aggregator operates over raw data while the momentSketchMerge aggregator should be used when aggregating precomputed sketches.

    1. {
    2. "type" : <aggregator_type>,
    3. "name" : <output_name>,
    4. "fieldName" : <input_name>,
    5. "k" : <int>,
    6. "compress" : <boolean>
    7. }

    Users can also query for the min/max of a distribution:

    1. {
    2. "type" : "momentSketchMin" | "momentSketchMax",
    3. }

    and make queries using the following aggregator + post-aggregator:

    1. {
    2. "aggregations": [{
    3. "type": "momentSketchMerge",
    4. "name": "sketch",
    5. "fieldName": "sketch",
    6. "k": 10,
    7. "compress": true
    8. }],
    9. "postAggregations": [
    10. {
    11. "type": "momentSketchSolveQuantiles",
    12. "field": {
    13. "type": "fieldAccess",
    14. "fieldName": "sketch"
    15. }
    16. },
    17. {
    18. "type": "momentSketchMin",
    19. "name": "min",
    20. "field": {
    21. "type": "fieldAccess",
    22. "fieldName": "sketch"
    23. }