Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed shortest path bug #28

Merged
merged 1 commit into from
Jun 23, 2023
Merged

fixed shortest path bug #28

merged 1 commit into from
Jun 23, 2023

Conversation

99alfie
Copy link
Collaborator

@99alfie 99alfie commented Jun 23, 2023

bug fixed, short explanation

example (propC having two paths):

entity

  • propA
    • propD
    • propE
    • propC
  • propB
  • propC

The recursive function would go in sequence, find propC under propA and mark it as "found" - encounters propC later and skips it as "already found" - effectively using the longer path

This is fixed now, before recursing, propA, propB and propC on the first level are marked as found, ensuring the shortest path is always taken.

I also added some inline comments to make the code (hopefully) easier to understand

@99alfie 99alfie linked an issue Jun 23, 2023 that may be closed by this pull request
@99alfie 99alfie requested a review from rkoschmitzky June 23, 2023 10:10
@rkoschmitzky rkoschmitzky merged commit f7f2fb5 into main Jun 23, 2023
@rkoschmitzky rkoschmitzky deleted the fix/i8-shortest-path branch June 26, 2023 09:32
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.

shortest path is not always being taken for schema relationships
2 participants