jychen7 commented on issue #2004:
URL: 
https://github.com/apache/arrow-datafusion/issues/2004#issuecomment-1070061477


   > Improve approx_quantile(column, quantile) to accept an optional 3rd 
params, e.g. approx_quantile(column, quantile, format)
   
   I have implement `approx_percentile_cont_from_sketch` at my fork repo 
[approx_percentile_cont_from_sketch.rs](https://github.com/jychen7/arrow-datafusion/blob/2004-tdigest-sketches-from-data-source/datafusion-physical-expr/src/expressions/approx_percentile_cont_from_sketch.rs)
 with test case 
[tests/sql/aggregates.rs](https://github.com/jychen7/arrow-datafusion/blob/4ad1f0b2f1965f70aaaffccf0a37e33f989fccb7/datafusion/tests/sql/aggregates.rs#L505)
 and [similar csv sketch 
file](https://github.com/jychen7/arrow-datafusion/blob/2004-tdigest-sketches-from-data-source/sketch-testing/data/tdigest_sketch.csv)
 as Druid, but I find it is not elegant enough.
   
   So want to try another way to introduce 
`approx_percentile_cont_with_weight(column, weight_column, percentile)` similar 
to [Trino](https://trino.io/docs/current/functions/aggregate.html) 
`approx_percentile(x, w, percentage)`


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


Reply via email to