feat: all paths between two nodes by SemyonSinchenko · Pull Request #828 · graphframes/graphframes · GitHub
Skip to content

feat: all paths between two nodes#828

Merged
SemyonSinchenko merged 10 commits into
graphframes:mainfrom
SemyonSinchenko:200-all-paths
Jun 10, 2026
Merged

feat: all paths between two nodes#828
SemyonSinchenko merged 10 commits into
graphframes:mainfrom
SemyonSinchenko:200-all-paths

Conversation

@SemyonSinchenko

Copy link
Copy Markdown
Collaborator

What changes were proposed in this pull request?

A simple wrapper over AggregateNeighbors for enumerating all paths between two nodes.

Why are the changes needed?

Close #200

P.S. PySpark + Docs after pre-approve of the API

Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala Outdated
Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala Outdated
@james-willis

Copy link
Copy Markdown
Collaborator

Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala
Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala
Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala
Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala Outdated
Comment thread core/src/main/scala/org/graphframes/lib/AllPaths.scala
@SemyonSinchenko

Copy link
Copy Markdown
Collaborator Author

Should the 0 hop path be returned? BFS would return that 0 hop path

What is zer-hop path between two nodes? Is it a self-loop in the case both source and target are the same? Does it make any sense?

@james-willis

Copy link
Copy Markdown
Collaborator

yes the 0 hop path is the self loop. maybe it is a 1-hop case...

@SemyonSinchenko

Copy link
Copy Markdown
Collaborator Author

yes the 0 hop path is the self loop. maybe it is a 1-hop case...

And to get it user must specify srcExpression === dstExpression that would be strange. I do not see any reasons to support it tbh. For cycles detection we have a standalone algorithm. I do not see this API as an API for detecting cycles.

@james-willis

Copy link
Copy Markdown
Collaborator

@SemyonSinchenko SemyonSinchenko merged commit 360ffe5 into graphframes:main Jun 10, 2026
8 checks passed
@SemyonSinchenko SemyonSinchenko deleted the 200-all-paths branch June 10, 2026 18:47
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: all paths between two nodes

3 participants