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: Make MultiStreamProjection usable for AggregateTo<> #2890

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Blackclaws
Copy link
Contributor

Adds support for MultiStreamProjection to AggregateTo<>

Open issue still to solve is that the Id of the resulting document is not set.

Closes #2889

Open Issue is that the Id is not set
@Blackclaws
Copy link
Contributor Author

So see also my comments on discord. But essentially, the way QueryAllRawEvents.ToAggregate works is not really conducive to MultiDocument outputs as well as setting any sort of Id on the result. The reason being that there is no grouping performed on the events and there is only a single expected output, while a MultiStreamProjection might have two or more outputs (if using Identities) and also QueryAllRawEvents.ToAggregate does try to use all events that are in the collection.

@jeremydmiller
Copy link
Member

I think this is fine for what it is. It's not a usage that I'd ever be recommending, it's more of just a "if there's nothing else you can do, try this".

I don' think the grouping should have any effect on AggregateTo() in the first place.

@Blackclaws
Copy link
Contributor Author

I think this is fine for what it is. It's not a usage that I'd ever be recommending, it's more of just a "if there's nothing else you can do, try this".

I don' think the grouping should have any effect on AggregateTo() in the first place.

You're probably right as its also consistent with how AggregateTo works for SingleStreamAggregations. I'll remove the WIP.

@Blackclaws Blackclaws changed the title WIP: fix: Make MultiStreamProjection usable for AggregateTo<> fix: Make MultiStreamProjection usable for AggregateTo<> Jan 15, 2024
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.

MultiStreamProjection is not supported with QueryAllRawEvents().AggregateTo<>()
2 participants