-
Notifications
You must be signed in to change notification settings - Fork 237
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
#GROUPBY and #COUNT is creating duplicate counts #2360
Comments
I created a test case that shows the issue in bugfix/groupedModelCounts |
lbschanno
added a commit
that referenced
this issue
May 14, 2024
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
It appears that when we have a groupby on a model field that maps to multiple fields that actually exist in the same record with the same value, then the counts being returned will be double the actual count of records.
The text was updated successfully, but these errors were encountered: