Skip to content

Add runnable .sql examples and regression tests for the built-in graph algorithms #794

Description

@Leomrlin

What & why

GeaFlow ships 19 built-in graph algorithms (PageRank, SSSP, WCC, Louvain, LPA,
KCore, TriangleCount, JaccardSimilarity, …), but the geaflow-dsl-runtime
regression suite only covers some of them. Filling in end-to-end
CALL ... YIELD tests for the rest guards against future refactors quietly
breaking an algorithm. Great if you want to understand what graph algorithms
actually compute.

GeaFlow 有 19 个内置图算法,但回归测试只覆盖了一部分。给其余算法补端到端的
CALL ... YIELD 测试,能防止后续重构悄悄改坏算法。想真正搞懂"图算法到底算了什么"的同学,这题很合适。

The task

Pick a few algorithms that have no tests (or thin coverage) and add .sql
queries + .txt expected outputs.

挑几个尚无测试或覆盖薄弱的算法,补 .sql 查询 + .txt 期望输出。

Where to look

  1. Test graph definition: geaflow-dsl-runtime/src/test/resources/modern_graph.sql.
  2. Query template: existing query/gql_algorithm_001.sql
    (CALL SSSP(1) YIELD (vid, distance) style); expected output at expect/gql_algorithm_001.txt.
  3. Test entry point: geaflow-dsl-runtime/.../runtime/query/GQLAlgorithmTest.java.

Done when

  • At least one .sql/.txt pair added per algorithm you claim
  • Expected outputs are verified by hand, not copied from program output
  • mvn test -Dtest=GQLAlgorithmTest passes
  • The PR briefly explains why each expected result is correct on the test graph

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions