-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support skewness(x)
in Aggregation function
#12295
Conversation
|
I think we can port tests from duckdb https://github.com/duckdb/duckdb/blob/main/test/sql/aggregate/aggregates/test_skewness.test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dharanad the PR brings a lot of value.
Would you mind resolving conflicts?
skewness(expression) | ||
``` | ||
|
||
#### Arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized we dont have any examples in aggregate_functions.ms
Basically I'm feeling we have too much of user .md files, duplicating the functions description and poorly connected to each other which confuses a lot. @alamb WDYT about having a single file for all SQL functions/scalars/expressions like in https://spark.apache.org/docs/latest/api/sql/index.html with description, examples Btw Spark holds an internal meta repository that allows such doc to be regenerated from the code, which can be next step |
I agree What I actually think would be ideal is exactly as @comphead describes and put all the documentation about the functions in the code, and then have a post processing step that auto generates the documentation This is how the configuration setting documentation is created. Here is the script that does it: BTW I think this is the direction @findepi is heading with #12266. I also think GlareDB did something similar, but I can't find the link now. |
I also wonder if we should consider where to draw the line on features to include (i.e. should we include |
Perhaps we can port this function to https://github.com/datafusion-contrib/datafusion-functions-extra as well now that @dmitrybugakov has started that project |
Closing this PR. Will move this to https://github.com/datafusion-contrib/datafusion-functions-extra as suggested |
Which issue does this PR close?
Part of #12254
Closes #12249
Implemented by referring to https://github.com/duckdb/duckdb/blob/main/src/core_functions/aggregate/distributive/skew.cpp
Rationale for this change
What changes are included in this PR?
Added
skewness
UDAF.Ref: https://duckdb.org/docs/sql/functions/aggregates#skewnessx
Are these changes tested?
Are there any user-facing changes?