Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias APPROX_PERCENTILE_CONT as PERCENTILE_CONT? #12533

Open
samuelcolvin opened this issue Sep 19, 2024 · 1 comment
Open

Alias APPROX_PERCENTILE_CONT as PERCENTILE_CONT? #12533

samuelcolvin opened this issue Sep 19, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@samuelcolvin
Copy link
Contributor

Is your feature request related to a problem or challenge?

See pydantic/logfire#433, it would be great to have a percentile_cont function available in DF that performed similarly to the postgres function of the same name.

Would it be appropriate/reasonable to simply alias approx_percentile_cont as percentile_cont? I've ready #1539, but I'm not familiar enough with the behaviour to know if it makes sense.

Describe the solution you'd like

Ideally the "fix" is as simple as adding an alias?

Describe alternatives you've considered

we could add the alias just in our code, but I'd love to hear whether @Dandandan @domodwyer @alamb think that makes sense?

Additional context

I also mentioned the need for WITHIN GROUP support in #11732.

@alamb
Copy link
Contributor

alamb commented Sep 19, 2024

I think the expectation for PERCENTILE_CONT is that it will implement an exact calculation -- and to do so the implementation needs to keep all the actual values (e.g. the same way MEDIAN works).

So in other words, I think aliasing PERCENTILE_CONT to the approximate version would be confusing to anyone who actually needed the real value 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants