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

Add covar, covar_pop and covar_samp aggregate functions #1551

Merged
merged 13 commits into from
Jan 13, 2022

Conversation

realno
Copy link
Contributor

@realno realno commented Jan 11, 2022

Which issue does this PR close?

Closes #1548 .

Rationale for this change

This PR adds covar, covar_pop and covar_samp statistical functions as aggregators to DataFusion.

What changes are included in this PR?

Are there any user-facing changes?

The following operators are added:
covar
covar_pop
covar_samp

No breaking changes.

@github-actions github-actions bot added ballista datafusion Changes in the datafusion crate documentation Improvements or additions to documentation labels Jan 11, 2022
@@ -605,6 +605,62 @@ mod tests {
Ok(())
}

#[test]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some test for variance to test merge rules.

@@ -411,6 +411,62 @@ mod tests {
Ok(())
}

#[test]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tests for merge rule.

@liukun4515
Copy link
Contributor

Thank you for your works! @realno

Copy link
Member

@houqp houqp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@liukun4515 liukun4515 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alamb alamb merged commit b4c77e5 into apache:master Jan 13, 2022
@alamb
Copy link
Contributor

alamb commented Jan 13, 2022

Thanks @realno @houqp and @liukun4515 -- I didn't review this code but I trust your reviews 👍

@realno realno deleted the add-covar-operators branch February 9, 2022 20:09
@alamb alamb changed the title Add covar operators Add covar, covar_pop and covar_samp aggregate functions Feb 10, 2022
@alamb alamb added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add covar operators to DataFusion
4 participants