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

Explain the attributes of sortNode. #481

Closed
shahzadlone opened this issue May 27, 2022 · 0 comments · Fixed by #558
Closed

Explain the attributes of sortNode. #481

shahzadlone opened this issue May 27, 2022 · 0 comments · Fixed by #558
Assignees
Labels
area/query Related to the query component feature New feature or request
Milestone

Comments

@shahzadlone
Copy link
Member

Subtask of #35.

Explain the attributes of sortNode.

@shahzadlone shahzadlone added feature New feature or request area/query Related to the query component labels May 27, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone May 27, 2022
@shahzadlone shahzadlone self-assigned this May 27, 2022
shahzadlone added a commit that referenced this issue Jul 5, 2022
- Relevant issue(s):
  Resolves #481.
  Fixes #584 ([2] case).

- Description
Adds the attributes for `sortNode` to be included in the returned explain graph response.
So far, we are only introducing 1 attribute, which represents a list containing all the `orderings` of each field requested to be sorted, with its corresponding direction.

- Request:
```
query @Explain {
  author(order: {age: ASC}) {
    name
    age
    verified
  }
}
```

- Response:
```
{
  "explain": {
    "selectTopNode": {
      "sortNode": {
        "selectNode": {
          "filter": null,
          "scanNode": {
            "filter":         null,
            "collectionID":   "3",
            "collectionName": "author",
            "spans": []{
              {
                "start": "/3",
                "end":   "/4",
              }
            }
          }
        }
        "orderings": []{
          {
            "direction": "ASC",
            "fields":     [ "age" ],
          }
        }
      }
    }
  }
}
```
shahzadlone added a commit that referenced this issue Jul 12, 2022
- Resolves: #589 

- Description: Hunch mentioned in last week's meeting was correct, it was indeed a `make` where it would populate the array with empties and then append being called on top of it. Also removed the function `IsEmpty()`, we used to check for empty elements previously which was introduced in #481.
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
)

- Relevant issue(s):
  Resolves sourcenetwork#481.
  Fixes sourcenetwork#584 ([2] case).

- Description
Adds the attributes for `sortNode` to be included in the returned explain graph response.
So far, we are only introducing 1 attribute, which represents a list containing all the `orderings` of each field requested to be sorted, with its corresponding direction.

- Request:
```
query @Explain {
  author(order: {age: ASC}) {
    name
    age
    verified
  }
}
```

- Response:
```
{
  "explain": {
    "selectTopNode": {
      "sortNode": {
        "selectNode": {
          "filter": null,
          "scanNode": {
            "filter":         null,
            "collectionID":   "3",
            "collectionName": "author",
            "spans": []{
              {
                "start": "/3",
                "end":   "/4",
              }
            }
          }
        }
        "orderings": []{
          {
            "direction": "ASC",
            "fields":     [ "age" ],
          }
        }
      }
    }
  }
}
```
shahzadlone added a commit to shahzadlone/defradb that referenced this issue Feb 23, 2024
- Resolves: sourcenetwork#589 

- Description: Hunch mentioned in last week's meeting was correct, it was indeed a `make` where it would populate the array with empties and then append being called on top of it. Also removed the function `IsEmpty()`, we used to check for empty elements previously which was introduced in sourcenetwork#481.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query Related to the query component feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant