-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add a method to order the query by specifing an order of entities #14432
Conversation
4fec9be
to
c955ede
Compare
Signed-off-by: Sarthak Singh <sarthak.singh99@gmail.com>
c955ede
to
04d215d
Compare
Do you have more use cases that would benefit from this API in mind? I struggle to think of anything that would not be covered by the current The current implementation of This also means that each (In the current commit, this new method checks whether the reordered entity list is a subset of the original, but neither checks for duplicates, or the "no removals" property) |
doesn't After thinking through a bit, I have to agree that We could add a do you think there is any value in adding I do think it is a little unintuitive to use |
What #14407 did was use the same machinery that hashers use to create different hashes,
What "random" should mean depends heavily on the use case, and different use cases have different trade-offs.
While there is cleanup that could be done around here, I don't think this approach is the way to go.
Same conclusion we came to in #14407! There are a few non-obvious uses for these sorts I know of, and I'd like to record them in an example. |
Objective
Fixes #14393
Solution
Add a way to easily specify the order in which you want to get the items from a query iterator by specifying the order of entities it should fetch the items in.
Showcase