Skip to content

test(dsl): add modern graph algorithm cases - #815

Merged
Leomrlin merged 1 commit into
apache:masterfrom
johntomcat7408-cmyk:test/794-modern-graph-algorithms
Aug 3, 2026
Merged

test(dsl): add modern graph algorithm cases#815
Leomrlin merged 1 commit into
apache:masterfrom
johntomcat7408-cmyk:test/794-modern-graph-algorithms

Conversation

@johntomcat7408-cmyk

Copy link
Copy Markdown
Contributor

Summary

  • add modern graph regression tests for cc, wcc, and kcore
  • add hand-verified expected outputs for each algorithm

Expected results

CC

The current implementation propagates the minimum string label through incoming edges. Each vertex therefore reports the minimum ID in its forward-reachable set: 1->1, 2->2, 3->3, 4->3, 5->5, and 6->3.

WCC

Treating the edges as undirected makes all six vertices connected, so every vertex reports component 1.

KCore

For k=2, vertices 2, 5, and 6 have degree 1 and are removed. Vertices 1, 3, and 4 form a triangle and remain with degree 2.

Tests

  • GQLAlgorithmTest: 4 tests run, 0 failures, 0 errors, 0 skipped
  • Checkstyle passed
  • Apache RAT passed

Related to #794

@kitalkuyo-gita kitalkuyo-gita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Leomrlin
Leomrlin merged commit ece614a into apache:master Aug 3, 2026
2 checks passed
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.

3 participants