You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Martijn Visser (Jira)" <ji...@apache.org> on 2022/07/29 05:58:00 UTC

[jira] [Commented] (FLINK-28736) Add APPROX_PERCENTILE function

    [ https://issues.apache.org/jira/browse/FLINK-28736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17572756#comment-17572756 ] 

Martijn Visser commented on FLINK-28736:
----------------------------------------

I would prefer to wait with this implementation to the release after Flink 1.16, since a) the release branch for that one will be cut in two weeks and b) in the release after that one, we'll update Calcite to 1.31. 

> Add APPROX_PERCENTILE function
> ------------------------------
>
>                 Key: FLINK-28736
>                 URL: https://issues.apache.org/jira/browse/FLINK-28736
>             Project: Flink
>          Issue Type: Improvement
>    Affects Versions: 1.15.1
>            Reporter: Josh Mahonin
>            Priority: Minor
>
> We have an {{APPROX_PERCENTILE}} UDF that we believe may be useful to the broader community. It's a rather simple implementation that wraps TDigest to return approximate quantile/percentile data in both batch and streaming mode.
> I'm somewhat torn as to how to properly contribute this. Following Calcite conventions, I believe this would qualify as an {{APPROXIMATE PERCENTILE_DISC}} function, although that would require Calcite >= 1.28 (FLINK-21239, FLINK-27998). 
> Alternatively, perhaps this could simply be dropped in as a new function that's not backed by Calcite, although it's not immediately clear to me how to proceed with that, though I'm happy to take guidance here.
> This is a gist of the implementation:
> https://gist.github.com/jmahonin/d75150999af30bc78bdf00c7b0ecbd4f



--
This message was sent by Atlassian Jira
(v8.20.10#820010)