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: Add explaination of spans for scanNode. #492

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

shahzadlone
Copy link
Member

RELEVANT ISSUE(S)

Resolves #474

DESCRIPTION

Adds the explanation of the spans attribute inside the scanNode.

Request:

query @explain {
	users(dockeys: ["bae-52b9170d-b77a-5887-b877-cbdbb99b009f","bae-1378ab62-e064-5af4-9ea6-49941c8d8f94"]) {
 		Name
 		Age
 	}
 }

Response:

{
	"explain": {
		"selectTopNode": {
			"selectNode": {
				"filter": nil,
				"scanNode": {
					"collectionID":   "1",
					"collectionName": "users",
					"filter":         nil,
					"spans": {
						{
							"start": "/1/bae-52b9170d-b77a-5887-b877-cbdbb99b009f",
							"end":   "/1/bae-52b9170d-b77a-5887-b877-cbdbb99b009g"
						},
						{
							"start": "/1/bae-1378ab62-e064-5af4-9ea6-49941c8d8f94",
							"end":   "/1/bae-1378ab62-e064-5af4-9ea6-49941c8d8f95"
						}
					}
				}
			}
		}
	}
}

HOW HAS THIS BEEN TESTED?

Locally and Integration Tests were updated.

CHECKLIST:

  • I have commented the code, particularly in hard-to-understand areas.
  • I have made sure that the PR title adheres to the conventional commit style (subset of the ones we use can be found under: tools/configs/chglog/config.yml

ENVIRONMENT / OS THIS WAS TESTED ON?

Please specify which of the following was this tested on (remove or add your own):

  • Arch Linux

@shahzadlone shahzadlone added the action/no-benchmark Skips the action that runs the benchmark. label Jun 1, 2022
@shahzadlone shahzadlone added this to the DefraDB v0.3 milestone Jun 1, 2022
@shahzadlone shahzadlone self-assigned this Jun 1, 2022
@shahzadlone shahzadlone requested review from AndrewSisley, jsimnz, fredcarle and orpheuslummis and removed request for AndrewSisley and jsimnz June 1, 2022 11:25
@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #492 (f312580) into develop (257bf09) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #492      +/-   ##
===========================================
+ Coverage    65.06%   65.09%   +0.03%     
===========================================
  Files           87       87              
  Lines        10233    10242       +9     
===========================================
+ Hits          6658     6667       +9     
  Misses        2927     2927              
  Partials       648      648              
Impacted Files Coverage Δ
query/graphql/planner/explain.go 67.39% <ø> (ø)
query/graphql/planner/scan.go 81.98% <100.00%> (+1.58%) ⬆️

Copy link
Contributor

@AndrewSisley AndrewSisley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Copy link
Collaborator

@fredcarle fredcarle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@shahzadlone shahzadlone merged commit 45978e0 into develop Jun 3, 2022
@shahzadlone shahzadlone deleted the lone/feat/add-scan-node-attributes branch June 3, 2022 12:55
shahzadlone added a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
- RELEVANT ISSUE(S)

Resolves sourcenetwork#474 

- DESCRIPTION

Adds the explanation of the `spans` attribute inside the `scanNode`.

Request:
```
query @Explain {
	users(dockeys: ["bae-52b9170d-b77a-5887-b877-cbdbb99b009f","bae-1378ab62-e064-5af4-9ea6-49941c8d8f94"]) {
 		Name
 		Age
 	}
 }
```

Response:
```
{
	"explain": {
		"selectTopNode": {
			"selectNode": {
				"filter": nil,
				"scanNode": {
					"collectionID":   "1",
					"collectionName": "users",
					"filter":         nil,
					"spans": {
						{
							"start": "/1/bae-52b9170d-b77a-5887-b877-cbdbb99b009f",
							"end":   "/1/bae-52b9170d-b77a-5887-b877-cbdbb99b009g"
						},
						{
							"start": "/1/bae-1378ab62-e064-5af4-9ea6-49941c8d8f94",
							"end":   "/1/bae-1378ab62-e064-5af4-9ea6-49941c8d8f95"
						}
					}
				}
			}
		}
	}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain the attributes of scanNode
3 participants