Skip to content

Conversation

@goungoun
Copy link
Contributor

@goungoun goungoun commented Oct 1, 2025

What changes were proposed in this pull request?

This PR implements a bidirectional motif pattern as a patterns that exist in both directions.
image

g.find("(u)<-[]->(v)").select("u.id", "v.id")

+---+---+
| id| id|
+---+---+
|  0|  1|
|  1|  0|
+---+---+

How does it work?

It rewrites the incoming pattern string before calling the Pattern.parse method.
For the bidirectional pattern, (u)<-[]->(v) is converted to (u)-[]->(v);(v)-[]->(u)
It also supports the reversed pattern (u)<-[]-(v). It converts to the pattern (v)-[]->(u)

Why are the changes needed?

The feature is based on issue #502. The opinion is that it confuses users without the feature.

@goungoun goungoun marked this pull request as ready for review October 1, 2025 13:13
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.63%. Comparing base (8f3e4fb) to head (7cc8da1).
⚠️ Report is 5 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #717      +/-   ##
==========================================
+ Coverage   86.06%   86.63%   +0.57%     
==========================================
  Files          63       63              
  Lines        2907     2889      -18     
  Branches      327      327              
==========================================
+ Hits         2502     2503       +1     
+ Misses        405      386      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@SemyonSinchenko SemyonSinchenko left a comment

Choose a reason for hiding this comment

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

~LGTM

@SemyonSinchenko
Copy link
Collaborator

@rjurney Please, take a look!

@goungoun
Copy link
Contributor Author

goungoun commented Oct 3, 2025

@SemyonSinchenko Thank you for your help!

@SemyonSinchenko
Copy link
Collaborator

@rjurney I want to see this feature in a new release and from my point of view, it is a time to start preparing it. What do you think?

@SemyonSinchenko
Copy link
Collaborator

In a meantime, @goungoun can I ask you to provide small updates for the documentation?
This md-file, for local testing just run ./build/sbt docs/laikaPreview

@SemyonSinchenko SemyonSinchenko mentioned this pull request Oct 6, 2025
7 tasks
@SemyonSinchenko
Copy link
Collaborator

I'm merging it now to make it a part of the new release.

@SemyonSinchenko SemyonSinchenko merged commit 61b1215 into graphframes:main Oct 9, 2025
5 checks passed
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: add bidirectional edges to network motif finding

3 participants