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

Switch AggregationSpec to ContextParser #50871

Merged
merged 2 commits into from
Jan 14, 2020

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Jan 10, 2020

We seem to have settled on the ContextParser interface for parsing
stuff, mostly because ObjectParser implements it. We don't really
need the old Aggregator.Parser interface any more because it
duplicates ContextParser but with the arguments reversed.

This adds support to AggregationSpec to declare aggregation parsers
using ContextParser. This should integrate cleanly with
ObjectParser. It doesn't drop support for Aggregator.Parser or
change the plugin interface at all so it should be safe to backport to
7.x. And we can remove Aggregator.Parser in a follow up which is only
targeted to 8.0.

We seem to have settled on the `ContextParser` interface for parsing
stuff, mostly because `ObjectParser` implements it. We don't really
*need* the old `Aggregator.Parser` interface any more because it
duplicates `ContextParser` but with the arguments reversed.

This adds support to `AggregationSpec` to declare aggregation parsers
using `ContextParser`. This should integrate cleanly with
`ObjectParser`. It doesn't drop support for `Aggregator.Parser` or
change the plugin intrface at all so it *should* be safe to backport to
7.x. And we can remove `Aggregator.Parser` in a follow up which is only
targeted to 8.0.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Aggregations)

@nik9000
Copy link
Member Author

nik9000 commented Jan 10, 2020

woops that looks like it upset the compiler.

Copy link
Contributor

@polyfractal polyfractal left a comment

Choose a reason for hiding this comment

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

LGTM.

@not-napoleon I don't think this affects or will-affect any of the VS refactor work, but since it's touching agg registration I thought I'd ping you just as an FYI.

@nik9000
Copy link
Member Author

nik9000 commented Jan 13, 2020

@not-napoleon would you prefer that I hold off on merging this?

@not-napoleon
Copy link
Member

Thanks for asking, but there's no reason I can see to hold off merging this for the values source stuff. I have a couple of changes in SearchModule, but it should still be a trivial merge for me.

@nik9000
Copy link
Member Author

nik9000 commented Jan 14, 2020

❤️

@nik9000 nik9000 merged commit 5809912 into elastic:master Jan 14, 2020
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Jan 14, 2020
We seem to have settled on the `ContextParser` interface for parsing
stuff, mostly because `ObjectParser` implements it. We don't really
*need* the old `Aggregator.Parser` interface any more because it
duplicates `ContextParser` but with the arguments reversed.

This adds support to `AggregationSpec` to declare aggregation parsers
using `ContextParser`. This should integrate cleanly with
`ObjectParser`. It doesn't drop support for `Aggregator.Parser` or
change the plugin intrface at all so it *should* be safe to backport to
7.x. And we can remove `Aggregator.Parser` in a follow up which is only
targeted to 8.0.
nik9000 added a commit that referenced this pull request Jan 14, 2020
We seem to have settled on the `ContextParser` interface for parsing
stuff, mostly because `ObjectParser` implements it. We don't really
*need* the old `Aggregator.Parser` interface any more because it
duplicates `ContextParser` but with the arguments reversed.

This adds support to `AggregationSpec` to declare aggregation parsers
using `ContextParser`. This should integrate cleanly with
`ObjectParser`. It doesn't drop support for `Aggregator.Parser` or
change the plugin intrface at all so it *should* be safe to backport to
7.x. And we can remove `Aggregator.Parser` in a follow up which is only
targeted to 8.0.
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this pull request Jan 23, 2020
We seem to have settled on the `ContextParser` interface for parsing
stuff, mostly because `ObjectParser` implements it. We don't really
*need* the old `Aggregator.Parser` interface any more because it
duplicates `ContextParser` but with the arguments reversed.

This adds support to `AggregationSpec` to declare aggregation parsers
using `ContextParser`. This should integrate cleanly with
`ObjectParser`. It doesn't drop support for `Aggregator.Parser` or
change the plugin intrface at all so it *should* be safe to backport to
7.x. And we can remove `Aggregator.Parser` in a follow up which is only
targeted to 8.0.
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 2, 2020
With elastic#50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 10 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit that referenced this pull request Mar 3, 2020
With #50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 10 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 3, 2020
)

With elastic#50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 10 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 3, 2020
With elastic#50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 9 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit that referenced this pull request Mar 3, 2020
…53072)

With #50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 10 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit that referenced this pull request Mar 4, 2020
With #50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 9 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit to nik9000/elasticsearch that referenced this pull request Mar 4, 2020
With elastic#50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 9 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
nik9000 added a commit that referenced this pull request Mar 4, 2020
With #50871 aggrgations should now be parsed directly by an
`ObjectParser` or `ConstructingObjectParser` without the need for the
ceremonial `parse` method. This removes 9 of those `parse` methods and
parses the aggregation directly from their `ObjectParser`.
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.

5 participants