Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Introduce AggregationStage API #4309

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

Open
christophstrobl wants to merge 3 commits into main
base: main
Choose a base branch
Loading
from issue/4306
Open

Introduce AggregationStage API #4309

christophstrobl wants to merge 3 commits into main from issue/4306

Conversation

Copy link
Member

@christophstrobl christophstrobl commented Mar 1, 2023

This PR does two things

  • 1st we make sure to use available pipeline stages to figure out the operation in use to avoid running into an exception if toDocument does not return anything because toPipelineStages does.
  • 2nd new it introduces new API intended to replace AggregationOperation with AggregationStage that does not suffer the problem outlined in AggregationOperation::toDocument method is deprecated, but MongoTemplate still uses it #4306 and moves us closer to MongoDB terminology, reducing cognitive overload. The default method arrangement also allowed to remove the deprecation warning within AggregationOperation.

With the introduction of AggregationStage we move the API closer to the MongoDB terminology removing kognitive overhead.
Also the change allows us to switch back and forth with the default implementations of toDocument and toDocuments which let's us remove the deprecation warnings having dedicated interfaces that indicate what to implement in order to comply with the usage pattern.
@mp911de mp911de added the status: on-hold We cannot start working on this issue yet label Mar 16, 2023
Copy link
Member

mp911de commented Mar 16, 2023

Introducing AggregationStage and a multi-document variant of that interface makes a lot of sense. In the light of our existing component it becomes obvious that we've mixed several concepts that are orthogonal (field-exposing operation that is a multi-document stage). We should revise our aggregation framework setup to let simple stages implement AggregationStage an decouple e.g. FieldsExposingAggregationOperation from AggregationStage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
status: on-hold We cannot start working on this issue yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AggregationOperation::toDocument method is deprecated, but MongoTemplate still uses it

AltStyle によって変換されたページ (->オリジナル) /