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

fix(i): Handle field in view query but not view SDL #2192

Merged
merged 5 commits into from
Jan 11, 2024

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #2183 #2189

Description

Handle field in view query but not view SDL.

As such fields cannot be queried by the user anyway, we can safely ignore them (instead of panicing).

@AndrewSisley AndrewSisley added bug Something isn't working area/query Related to the query component labels Jan 11, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.9 milestone Jan 11, 2024
@AndrewSisley AndrewSisley requested a review from a team January 11, 2024 15:09
@AndrewSisley AndrewSisley self-assigned this Jan 11, 2024

func TestView_OneToManyWithRelationInQueryButNotInSDL(t *testing.T) {
test := testUtils.TestCase{
Description: "One to many view",
Copy link
Contributor

Choose a reason for hiding this comment

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

todo: please the description more descriptive :)

Copy link
Contributor Author

@AndrewSisley AndrewSisley Jan 11, 2024

Choose a reason for hiding this comment

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

Lol - sorry 😁

  • Sort out description(s?)

UserView {
name
}
}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: indentation here (and in above query) is a bit off

Copy link
Contributor Author

@AndrewSisley AndrewSisley Jan 11, 2024

Choose a reason for hiding this comment

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

cheers, will fix

  • Fix indentation

Copy link
Contributor

@islamaliev islamaliev left a comment

Choose a reason for hiding this comment

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

Look good. Have just minor comments

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (72732f3) 74.27% compared to head (a797d41) 74.26%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2192      +/-   ##
===========================================
- Coverage    74.27%   74.26%   -0.00%     
===========================================
  Files          256      256              
  Lines        25465    25477      +12     
===========================================
+ Hits         18912    18920       +8     
- Misses        5267     5271       +4     
  Partials      1286     1286              
Flag Coverage Δ
all-tests 74.26% <100.00%> (-<0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
core/doc.go 95.16% <100.00%> (+0.38%) ⬆️
planner/view.go 77.55% <100.00%> (+1.46%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72732f3...a797d41. Read the comment docs.

@AndrewSisley AndrewSisley merged commit 67a4552 into sourcenetwork:develop Jan 11, 2024
30 of 31 checks passed
@AndrewSisley AndrewSisley deleted the 2183-partial-sdl branch January 11, 2024 15:44
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Jan 22, 2024
## Relevant issue(s)

Resolves sourcenetwork#2183 sourcenetwork#2189

## Description

Handle field in view query but not view SDL.

As such fields cannot be queried by the user anyway, we can safely
ignore them (instead of panicing).
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
## Relevant issue(s)

Resolves sourcenetwork#2183 sourcenetwork#2189

## Description

Handle field in view query but not view SDL.

As such fields cannot be queried by the user anyway, we can safely
ignore them (instead of panicing).
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 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schema View: panics with field in SDL that partially matches aggregate in query
2 participants