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 #GROUPBY duplicate counts with query model #2388

Open
wants to merge 7 commits into
base: integration
Choose a base branch
from

Conversation

lbschanno
Copy link
Collaborator

When query model mapping is applied to a document before grouping and aggregating, it is possible for multiple fields to be mapped to the same root model mapping with the same value, resulting in duplicate field-value pairings that were incorrectly included in grouping and aggregation.

Ensure that duplicate field-value pairings are disregarded. Add tests to verify this and update documentation to include details about how model mapping affects the #GROUPBY function.

Fixes #2360

When query model mapping is applied to a document before grouping and
aggregating, it is possible for multiple fields to be mapped to the same
root model mapping with the same value, resulting in duplicate
field-value pairings that were incorrectly included in grouping and
aggregation.

Ensure that duplicate field-value pairings are disregarded. Add tests to
verify this and update documentation to include details about how model
mapping affects the #GROUPBY function.

Fixes #2360
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.

#GROUPBY and #COUNT is creating duplicate counts
4 participants