You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The library currently aggregates related node values in a way that depends on how many relationships exist between the same two nodes. For instance, if a node is connected via multiple relationships, its aggregated values (such as the sum of ages) will be counted multiple times. This behavior causes inconsistent aggregation results when duplicate relationships exist between nodes. The expected outcome is that each unique related node is counted only once, regardless of the number of relationships linking them.
query {
movies {
actorsAggregate {
node {
age {
sum
}
}
}
}
}
Expected behavior
For a movie with actors connected via relationships, each unique actor should contribute only once to the aggregated sum of their ages. In the given scenario, although "Arnold" has two separate "ACTED_IN" relationships (due to different characters), his age should only be summed once alongside Linda's. Therefore, the expected aggregate age should be 91 (54 for Arnold + 37 for Linda), but the current behavior counts Arnold twice, leading to an incorrect sum.
We've been able to confirm this bug using the steps to reproduce that you provided - many thanks @MacondoExpress! 🙏 We will now prioritise the bug and address it appropriately.
Describe the bug
The library currently aggregates related node values in a way that depends on how many relationships exist between the same two nodes. For instance, if a node is connected via multiple relationships, its aggregated values (such as the sum of ages) will be counted multiple times. This behavior causes inconsistent aggregation results when duplicate relationships exist between nodes. The expected outcome is that each unique related node is counted only once, regardless of the number of relationships linking them.
Type definitions
To Reproduce
Populate the DB with the following data.
Data
Run the following query:
Expected behavior
For a movie with actors connected via relationships, each unique actor should contribute only once to the aggregated sum of their ages. In the given scenario, although "Arnold" has two separate "ACTED_IN" relationships (due to different characters), his age should only be summed once alongside Linda's. Therefore, the expected aggregate age should be 91 (54 for Arnold + 37 for Linda), but the current behavior counts Arnold twice, leading to an incorrect sum.
Current output
System (please complete the following information):
Additional information
In the Cypher produced sum does not contain
DISTINCT
This is not an issue specific to
sum
but tocount
as well:The above will count 3 actors rather than 2.
The text was updated successfully, but these errors were encountered: