Skip to content

Conversation

@dkuppitz
Copy link
Contributor

@dkuppitz dkuppitz commented Mar 2, 2018

https://issues.apache.org/jira/browse/TINKERPOP-1777

Fixed the behavior of min(), max(), mean() and sum().
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 -i passed.

VOTE: +1

dkuppitz added 2 commits March 2, 2018 13:39
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.
Copy link
Contributor

@spmallette spmallette Mar 3, 2018

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]
----
Copy link
Contributor

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 |
Copy link
Contributor

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)

Copy link
Contributor Author

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.

@asfgit asfgit merged commit b6501ca into master Mar 7, 2018
@asfgit asfgit deleted the TINKERPOP-1777 branch April 14, 2018 15:44
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.

3 participants