-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…4184) <!-- Thanks for your contribution! please review https://github.com/alibaba/GraphScope/blob/main/CONTRIBUTING.md before opening an issue. --> ## What do these changes do? This PR introduces a new option `TRAIL` for Path Expand by specifying `PATH_OPT` as`TRAIL`. It ensures no duplicated edges (i.e., unique edges) during the traversals, e.g., <img width="612" alt="example" src="https://github.com/user-attachments/assets/766d338e-86f7-4271-98ae-0b3ce8d53fc2"> ### Configurations Currently, we support `PATH_OPT` values `ARBITRARY`, `SIMPLE` and `TRAIL`. The differences are as follows: Parameter | Supported Values | Description -----------|-------------------|------------------------------------------------ PATH_OPT | ARBITRARY | Allow vertices or edges to be duplicated. PATH_OPT | SIMPLE | No duplicated nodes. PATH_OPT | TRAIL | No duplicated edges. RESULT_OPT| END_V | Only keep the end vertex. RESULT_OPT| ALL_V | Keep all vertices along the path. RESULT_OPT| ALL_V_E | Keep all vertices and edges along the path. ### Example from A to X: - **Arbitrary path** (`PATH_OPT=ARBITRARY`): Infinite paths in the figure. - **Simple path** (`PATH_OPT=SIMPLE`): Just one path A->B->C->D->X - **Trail** (unique edge, `PATH_OPT=TRAIL`): Two paths, A->B->C->D->X, and A->B->C->E->F->C->D->X ![image](https://github.com/user-attachments/assets/e267c89b-1cce-45fb-a8fe-1b0692a030bb) The term "trail" is defined in [1]. <!-- Please give a short brief about these changes. --> ## Related issue number <!-- Are there any issues opened that will be resolved by merging this change? --> Fixes [#4072](#4072) [1] Deutsch, Alin, et al. "Graph pattern matching in GQL and SQL/PGQ." Proceedings of the 2022 International Conference on Management of Data. 2022. --------- Co-authored-by: BingqingLyu <[email protected]> Co-authored-by: xiaolei.zl <[email protected]>
- Loading branch information
1 parent
1159170
commit d934a83
Showing
16 changed files
with
322 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2312,6 +2312,7 @@ mod graph { | |
pub enum PathOpt { | ||
Arbitrary = 0, | ||
Simple = 1, | ||
Trail = 2, | ||
} | ||
|
||
#[allow(dead_code)] | ||
|
Oops, something went wrong.