nozjkoitop commented on issue #18258:
URL: https://github.com/apache/druid/issues/18258#issuecomment-3084321142

   Hi @icksa, APPROX_QUANTILE_DS works on Quantiles DoublesSketch, not on 
KllDoublesSketch which is causing ClassCastException
   
   What you might've been looking for, is the KllDoublesSketch aggregator and 
KllDoublesSketchToQuantile post-aggregator, those are not exposed through the 
current SQL functions, but you can use native query here, somehow like this: 
   
   ```
   {
      "queryType":"timeseries",
      "dataSource":{
         "type":"table",
         "name":"kll_doubles"
      },
      "intervals":{
         "type":"intervals",
         "intervals":[
            "-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z"
         ]
      },
      "granularity":{
         "type":"all"
      },
      "aggregations":[
         {
            "type":"KllDoublesSketch",
            "name":"kll_union",
            "fieldName":"kll_sketch",
            "k":256,
            "maxStreamLength":1000000000
         }
      ],
      "postAggregations":[
         {
            "type":"KllDoublesSketchToQuantile",
            "name":"p50",
            "field":{
               "type":"fieldAccess",
               "fieldName":"kll_union"
            },
            "fraction":0.5
         }
      ],
   }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to