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

Fix failure in nested groupBy with multiple aggregators with same… #1762

Closed
wants to merge 2 commits into from
Closed

Fix failure in nested groupBy with multiple aggregators with same… #1762

wants to merge 2 commits into from

Conversation

dclim
Copy link
Contributor

@dclim dclim commented Sep 22, 2015

…fieldName

Seems to be a side effect of using an intermediate IncrementalIndex to handle nested group bys. Fix is to prevent adding multiple columns with the same fieldName to the index. The AggregatorFactory type may be lost since it doesn't add subsequent factories with the same name, but I don't think that affects the function of the intermediate index.

This is a hack in the sense that the real solution is to re-write groupbys to not require massaging the data to work with IncrementalIndex.

Closes #1419

…ldName

Seems to be a side effect of using an intermediate IncrementalIndex to
handle nested group bys. Fix is to prevent adding multiple columns with
the same fieldName to the index. The AggregatorFactory type may be lost
since it doesn't add subsequent factories with the same name, but I
don't think that affects the function of the intermediate index.

This is a hack in the sense that the real solution is to re-write
group-bys to not require massaging the data to work with
IncrementalIndex.

Closes #1419
.setGranularity(QueryRunnerTestHelper.dayGran)
.build();

GroupByQueryRunnerTestHelper.runQuery(factory, runner, query);
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be a TestHelper.assertExpectedObjects here for what the result of the query is supposed to be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The result is covered by other similar tests so I didn't want to make a redundant test. This case used to throw an exception before the change so the test is to assert that no exception is thrown more so than the results. If you think there's value in verifying the results I can do that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that if there's value in testing a query at all, then there is definitely value in making sure that the results are what you would expect.

@fjy fjy added this to the 0.8.2 milestone Sep 24, 2015
@dclim dclim closed this Sep 28, 2015
@dclim dclim deleted the nested-groupby-multiple-same-aggregator-fix branch November 10, 2015 18:17
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.

None yet

4 participants