Skip to content

Conversation

@SemyonSinchenko
Copy link
Collaborator

What changes were proposed in this pull request?

While this implementation is better than existing one, it cannot be scaled to power-law graphs. And making a more efficient one is very tricky. I'm recommending to accept this implementation and consider making something like ApproximateTriangleCount in the future. There are tons of papers about different sampling strategies, assumptions and approximation rate. Different strategies are suitable for different classes of graphs.

A proposed in this PR implementation is exactly like one from GraphX. I don't think that there can be anything better for exact counting in most of cases.

Why are the changes needed?

Close #407

@james-willis
Copy link
Collaborator

Ok. lets let Russell review this.

@SemyonSinchenko
Copy link
Collaborator Author

We discussed it with @rjurney , I'm merging this one.

@SemyonSinchenko SemyonSinchenko merged commit d801d34 into graphframes:main Sep 27, 2025
5 checks passed
@SemyonSinchenko SemyonSinchenko deleted the 407-triangles-count branch September 27, 2025 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: write a more efficient implementation of GraphFrame.triangleCount()

2 participants