Skip to content

Add Spark CBO config tips for boosting motif finding performance#845

Merged
SemyonSinchenko merged 4 commits into
graphframes:mainfrom
WeichenXu123:motif-finding-cbo-tip
Jun 8, 2026
Merged

Add Spark CBO config tips for boosting motif finding performance#845
SemyonSinchenko merged 4 commits into
graphframes:mainfrom
WeichenXu123:motif-finding-cbo-tip

Conversation

@WeichenXu123
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Add Spark CBO config tips for boosting motif finding performance

Why are the changes needed?

Doc and guide updates.

Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Copilot AI review requested due to automatic review settings June 8, 2026 04:29
@WeichenXu123
Copy link
Copy Markdown
Contributor Author

@SemyonSinchenko would you take a look ? :)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves GraphFrames motif-finding documentation by adding practical Spark Cost-Based Optimizer (CBO) configuration guidance to help users speed up motif queries (which compile down to multi-join plans).

Changes:

  • Expanded GraphFrame.find() Python docstring with a motif DSL explanation and join/CBO performance tips.
  • Added a “Performance” section to the motif-finding user guide describing CBO + join reordering and the DP threshold.
  • Added an analogous “Performance” section to the Scala GraphFrame.find Scaladoc.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
python/graphframes/graphframe.py Enhances Python API docstring for motif finding, including CBO/join reordering tips.
docs/src/04-user-guide/04-motif-finding.md Adds a new Performance section documenting Spark CBO settings for motif-finding joins.
core/src/main/scala/org/graphframes/GraphFrame.scala Updates Scala Scaladoc for find with the same CBO/join reorder performance guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/graphframes/graphframe.py Outdated
Comment thread docs/src/04-user-guide/04-motif-finding.md Outdated
Comment thread core/src/main/scala/org/graphframes/GraphFrame.scala Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

⚠️ 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 80.78%. Comparing base (a28a4e8) to head (4d239b9).
⚠️ Report is 13 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     #845      +/-   ##
==========================================
+ Coverage   80.75%   80.78%   +0.03%     
==========================================
  Files          78       78              
  Lines        4421     4428       +7     
  Branches      543      536       -7     
==========================================
+ Hits         3570     3577       +7     
  Misses        851      851              

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
@SemyonSinchenko
Copy link
Copy Markdown
Collaborator

SemyonSinchenko commented Jun 8, 2026

@WeichenXu123 Thanks for the contribution! Could you please apply ./build/sbt scalafmtAll (or pre-commit run --all-files)? And after that we can merge.

Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
@SemyonSinchenko SemyonSinchenko merged commit 0d634b6 into graphframes:main Jun 8, 2026
8 checks passed
@SemyonSinchenko
Copy link
Copy Markdown
Collaborator

@WeichenXu123 Thanks for this contrition! I will trigger docs re-build.

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.

4 participants