Skip to content

Conversation

@insidedctm
Copy link
Contributor

@jegonzal @ankurdave please could you review

What changes were proposed in this pull request?

Reworking of @jegonzal PR #2495 to address the issue identified in SPARK-3650. Code amended to use the convertToCanonicalEdges method.

How was the this patch tested?

Patch was tested using the unit tests created in PR #2495

// This algorithm double counts each triangle so the final count should be even
val isEven = (dblCount & 1) == 0
if (!isEven) {
throw new Exception("Triangle count resulted in an invalid number of triangles.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just require(...) this condition. (dblCount % 2) == 0 would be a little more canonical

@insidedctm
Copy link
Contributor Author

@srowen good points, I've updated and pushed changes in line with your comments

@srowen
Copy link
Member

srowen commented Feb 21, 2016

Jenkins, test this please

@SparkQA
Copy link

SparkQA commented Feb 21, 2016

Test build #51640 has finished for PR 11290 at commit 1e6f5d2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jegonzal
Copy link
Contributor

This looks good to me. @insidedctm thanks for reviving the PR and @srowen thanks for taking a look at this! My only minor concern is that it will change the results for people that are using triangle count so we should note this in the change log on the next release.

@rxin
Copy link
Contributor

rxin commented Feb 22, 2016

This is great timing given the next version is 2.0.

@rxin
Copy link
Contributor

rxin commented Feb 22, 2016

I'm going to merge this in master. Thanks.

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.

5 participants