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

[v2] When using both groupBy and orderBy, results aren't ordered #478

Closed
aaj3f opened this issue May 12, 2023 · 1 comment · Fixed by #484
Closed

[v2] When using both groupBy and orderBy, results aren't ordered #478

aaj3f opened this issue May 12, 2023 · 1 comment · Fixed by #484
Assignees

Comments

@aaj3f
Copy link
Contributor

aaj3f commented May 12, 2023

Description

This v2 bug fix is being prioritized because it affects a client under contract

When using groupBy results are obviously grouped according to the binding provided to groupBy. Within those grouped results, if using orderBy the results themselves are not currently being ordered

{
  "select": ["?user", "?username", "?type"],
  "where": [
    ["?user", "_user/username", "?username"],
    ["?user", "_user/type", "?type"]
  ],
  "opts": {
      "groupBy": "?type",
      "orderBy": "?username"
  }
}

// =>

{
  "dog": [
    [
      87960930223086,
      "zeta",
      "dog"
    ],
    [
      87960930223084,
      "delta",
      "dog"
    ],
    [
      87960930223082,
      "beta",
      "dog"
    ]
  ],
  "person": [
    [
      87960930223085,
      "epsilon",
      "person"
    ],
    [
      87960930223083,
      "gamma",
      "person"
    ],
    [
      87960930223081,
      "alpha",
      "person"
    ]
  ]
}
@cap10morgan
Copy link
Contributor

Fixed by #484 & fluree/ledger#208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants