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

Partial tree sort tests #613

Merged
merged 1 commit into from
Mar 3, 2023
Merged

Conversation

kbrock
Copy link
Collaborator

@kbrock kbrock commented Mar 3, 2023

extracted from #415

add documentation to tests.

Unsure if we can assume that nodes passed into sort_by_ancestry are in a sane order.

Drop STRICT. We already follow these cases.
I also cant remember why that case is significant / what it is trying to tell

Drop a number of if cases that I'm pretty sure are deterministic
I also documented why the non-optimal values are returned.

use a common ranking function: RANK_SORT
@kbrock
Copy link
Collaborator Author

kbrock commented Mar 3, 2023

update:

I had thought that pagination would ensure that you don't end up with cousins and not at least one aunt/uncle. It looks like even when using order_by_ancestry_and(:rank) that you can definitely get cousins without any parents.

Dropped that set of test changes.

example for reference:

  • 1
    • 6
  • 2
    • 8
  • 3
  • 4
  • 5
    • 7

order(ancestry,id): 1, 2, 3, 4, 5, 6, 8, 7

since 6,8 are so far from 1,2, pagination can definitely throw them seperate.

@kbrock kbrock merged commit 7ec1a51 into stefankroes:master Mar 3, 2023
@kbrock kbrock deleted the partial_tree_sort_tests branch March 3, 2023 02:50
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.

1 participant