Skip to content

Remove generic on AggregatorFactory #43664

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

Merged
merged 4 commits into from
Jul 3, 2019

Conversation

polyfractal
Copy link
Contributor

AggregatorFactory was generic over itself, but it doesn't appear we use this functionality anywhere (e.g. to allow the super class to declare arguments/return types generically for subclasses to override). Most places use a wildcard constraint, and even when a concrete type is specified it wasn't used.

But since AggFactories are widely used, this led to the generic touching many pieces of code and making type signatures fairly complex

It's possible I'm totally missing something, but after the replace everything still compiles, tests seem to run fine, I don't see any missing functionality, etc.

AggregatorFactory was generic over itself, but it doesn't appear we
use this functionality anywhere (e.g. to allow the super class
to declare arguments/return types generically for subclasses to
override).  Most places use a wildcard constraint, and even when a
concrete type is specified it wasn't used.

But since AggFactories are widely used, this led to
the generic touching many pieces of code and making type signatures
fairly complex
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

<3

@polyfractal
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1

@polyfractal
Copy link
Contributor Author

@elasticmachine update branch

@polyfractal
Copy link
Contributor Author

@elasticmachine update branch

@jpountz jpountz added v7.4.0 and removed v7.3.0 labels Jul 3, 2019
@polyfractal polyfractal merged commit c0d5bec into elastic:master Jul 3, 2019
@polyfractal polyfractal deleted the degenerify_agg_factory branch July 3, 2019 20:06
polyfractal added a commit to polyfractal/elasticsearch that referenced this pull request Jul 8, 2019
AggregatorFactory was generic over itself, but it doesn't appear we
use this functionality anywhere (e.g. to allow the super class
to declare arguments/return types generically for subclasses to
override).  Most places use a wildcard constraint, and even when a
concrete type is specified it wasn't used.

But since AggFactories are widely used, this led to
the generic touching many pieces of code and making type signatures
fairly complex
polyfractal added a commit that referenced this pull request Jul 10, 2019
AggregatorFactory was generic over itself, but it doesn't appear we
use this functionality anywhere (e.g. to allow the super class
to declare arguments/return types generically for subclasses to
override).  Most places use a wildcard constraint, and even when a
concrete type is specified it wasn't used.

But since AggFactories are widely used, this led to
the generic touching many pieces of code and making type signatures
fairly complex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants