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

feat(Query): Add random keyword in DQL #7693

Merged
merged 3 commits into from
Apr 25, 2021

Commits on Apr 7, 2021

  1. Configuration menu
    Copy the full SHA
    63aba94 View commit details
    Browse the repository at this point in the history

Commits on Apr 13, 2021

  1. random query (dgraph-io#7693) - remove duplicates in result and renam…

    …e random_
    
    To remove duplicates, I had to:
     - introduce a new struct `UidKey` to store the index of a UID in the
       matrix
     - calculate total number of nodes and check if required number of nodes
       is less than that. If it's not, return all the nodes.
     - one caveat is that the order is not randomized when the requested
       number is equal to total number of nodes.
    Samyak2 committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    6252918 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2021

  1. random query (dgraph-io#7693) - simpler random selection

    the random uids are now selected from each uid list instead of
    the uid matrix. This simplifies the process.
    Samyak2 committed Apr 22, 2021
    Configuration menu
    Copy the full SHA
    558ea5d View commit details
    Browse the repository at this point in the history