Skip to content

Aggregation refactor: make aggregationFactory implement NamedWritable#12830

Merged
colings86 merged 1 commit intoelastic:feature/aggs-refactoringfrom
colings86:enhancement/AggFactoryRefactor
Aug 18, 2015
Merged

Aggregation refactor: make aggregationFactory implement NamedWritable#12830
colings86 merged 1 commit intoelastic:feature/aggs-refactoringfrom
colings86:enhancement/AggFactoryRefactor

Conversation

@colings86
Copy link
Copy Markdown
Contributor

Also makes AggregatorFactories implement Writable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a bit weird to create an array list with a known size, just to convert it to an array. Let's build an array directly?

@jpountz
Copy link
Copy Markdown
Contributor

jpountz commented Aug 13, 2015

I gave it a quick look and I think the fact that most aggregation objects track their parent is going to make the refactoring a bit less straightforward than for queries (see comments about serialization and checking for parents in equals)

@colings86
Copy link
Copy Markdown
Contributor Author

@jpountz I've pushed a commit addressing your comments. If you could especially check the equals and hashCode methods in AggregatoryFactory, ValuesSourceAggregatorFactory, PipelineAggregatorFactory and AggregatorFactories, that would be great

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if we should start already sharing some common code between our BaseQueryTestCase and this class....wouldn't want to complicate things though. Also our base test class in not in master of course so that woul already complicate things...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One more thing, maybe you want to have a testEqualsAndHashcode like we recently introduced in the query-refactoring branch, just to make sure that equals and hashcode are properly implemented.

@javanna
Copy link
Copy Markdown
Contributor

javanna commented Aug 14, 2015

I had a look and this looks good to me, I think the main concern around equality checks has been addressed, all good besides that

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

duplicated empty javadocs? :)

@jpountz
Copy link
Copy Markdown
Contributor

jpountz commented Aug 14, 2015

LGTM

@colings86 colings86 force-pushed the feature/aggs-refactoring branch from 7cbf5e5 to cffd2d2 Compare August 18, 2015 11:54
Also makes AggregatorFactories implement Writable
@colings86 colings86 merged commit 378c717 into elastic:feature/aggs-refactoring Aug 18, 2015
@colings86 colings86 deleted the enhancement/AggFactoryRefactor branch August 18, 2015 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants