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] use of groupBy with vars returns null results #499

Open
aaj3f opened this issue Jun 8, 2023 · 0 comments
Open

[v2] use of groupBy with vars returns null results #499

aaj3f opened this issue Jun 8, 2023 · 0 comments
Assignees
Labels
bug Something isn't working as expected v2 Fluree

Comments

@aaj3f
Copy link
Contributor

aaj3f commented Jun 8, 2023

Description

Using groupBy with a ?binding that is also a ?binding in the vars map causes the query to return null results.

For example, the following query:

{
    "selectDistinct": [
        "?studentName",
        "?studentId"
    ],
    "where": [
      ["?profile", "profile/name", "?studentName"],
      ["?profile", "profile/student_id", "?studentId"]
    ],
    "vars": {
        "?studentName": ["Gates Lowery", "Kate Giovacchini"]
    },
    "opts": {
      "groupBy": "?studentName"
    }
}

// =>

null

However, this same query would work were you to remove either the vars map or the groupBy opt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected v2 Fluree
Projects
None yet
Development

No branches or pull requests

2 participants