-
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
Add corr
aggregate function
#1561
Conversation
why not support |
|
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.
LGTM
you can rebase the master, after the Clippy fixed
if let ScalarValue::Float64(Some(c)) = covar { | ||
if let ScalarValue::Float64(Some(s1)) = stddev1 { | ||
if let ScalarValue::Float64(Some(s2)) = stddev2 { | ||
return Ok(ScalarValue::Float64(Some(c / s1 / s2))); |
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.
can s1 or s2 be 0?
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.
They may be 0, pushed a fix. Thanks for finding this.
Thanks @realno ! |
Which issue does this PR close?
This PR add the
corr
function which is part of #1486Rationale for this change
Add correlation function to DataFusion.
What changes are included in this PR?
New function
corr(col1, co2)
is added.Are there any user-facing changes?
New function
corr(col1, co2)
is added.No breaking change.