-
Notifications
You must be signed in to change notification settings - Fork 844
TINKERPOP-1777 Gremlin .max step returns -2147483648 for empty result sets #805
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
Conversation
If no input is given, these steps will now throw a `FastNoElementException`. Also adjusted existing test cases to be in line with the new behavior.
| This release also includes changes from <<release-3-3-2, 3.3.2>>. | ||
| * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value despite no elements being available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a changelog entry for 3.4.0 as this is pointed at the master branch? nevermind i misread where it was
| ......1> by(label). | ||
| ......2> by(coalesce(outE().values("weight"), constant(0)).sum()) | ||
| ==>[software:0,person:3.5] | ||
| ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the "See: {jira_issue}"
| | d[3].l | | ||
| | d[0].l | | ||
| | d[1.9].d | | ||
| | d[0].i | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just so i'm clear, this value is no longer in the output because vadas (aka v[2]) has no out edges to sum a weight on...is that right? if so, do you happen to know what catches the thrown FastNoSuchElementException and prevents it from bubbling up just kill the whole traversal? (i'm just trying to follow how the code works here for my own edification)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just so i'm clear, this value is no longer in the output because vadas (aka v[2]) has no out edges to sum a weight on...is that right?
Exactly.
It's the same thing as doing just g.V(2).outE() - the traverser would simply die as there are no outgoing edges. Likewise with outE().values('weight').sum(), there simply is no sum, hence the traverser dies.
https://issues.apache.org/jira/browse/TINKERPOP-1777
Fixed the behavior of
min(),max(),mean()andsum().If no input is given, these steps will now throw a
FastNoElementException.Also adjusted existing test cases to be in line with the new behavior.
docker/build.sh -t -ipassed.VOTE: +1