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

DRILL-4521: Map variance() and stddev() to var_samp() and stddev_samp() respectiv… #437

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minji-kim
Copy link
Contributor

…ely, and allow for DrillReduceAggregateRule to apply to them

Right now, variance() and stddev() is not mapped to var_samp() and stddev_samp() respectively, and they cannot be reduced to sums of squares (by DrillReduceAggregateRule). DrillReduceAggregateRule allows variance/stddev functions to be aggregated over 2-phase aggregation. Without this, stddev/variance is always done in a single phase aggregation. Added test cases to verify.

public class TestAggregationQueries extends PlanTestBase {

@Test // DRILL-4521
public void testVariance() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you call these ensureVarianceIsAggregateReduced and ensureStddevIsAggregateReduced or something similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

…ely, and allow for DrillReduceAggregateRule to apply to them

test name change
@minji-kim minji-kim changed the title Map variance() and stddev() to var_samp() and stddev_samp() respectiv… DRILL-4521: Map variance() and stddev() to var_samp() and stddev_samp() respectiv… Mar 22, 2016
@StevenMPhillips
Copy link
Contributor

+1

vkorukanti pushed a commit to vkorukanti/drill that referenced this pull request Apr 12, 2016
…() respectively, and allow for DrillReduceAggregateRule to apply to them

test name change

this closes apache#437
gparai pushed a commit to gparai/drill that referenced this pull request Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants