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: Error if child _group selected without parent groupBy #781

Merged
merged 2 commits into from
Sep 8, 2022

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #702

Description

Error pleasantly if child _group selected without parent groupBy. Proposed fix is the simple solution, however there was talk about adding a query validation package/stage (possibly between mapper and planner), however that would take a fair amount more effort, and currently this might be the only item requiring it - if there are others I would suggest noting them all in a refactor ticket and moving them (including this simple fix) to that system in a dedicated ticket - but let me know as we did mention this in standup I think.

Specify the platform(s) on which this was tested:

  • Debian Linux

@AndrewSisley AndrewSisley added bug Something isn't working area/query Related to the query component action/no-benchmark Skips the action that runs the benchmark. labels Sep 8, 2022
@AndrewSisley AndrewSisley added this to the DefraDB v0.3.1 milestone Sep 8, 2022
@AndrewSisley AndrewSisley requested a review from a team September 8, 2022 15:39
@AndrewSisley AndrewSisley self-assigned this Sep 8, 2022
@AndrewSisley AndrewSisley changed the title fix: Error pleasantly if child _group selected without parent groupBy fix: Error if child _group selected without parent groupBy Sep 8, 2022
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! Thanks for fixing this.

@AndrewSisley AndrewSisley force-pushed the sisley/fix/I702-count-on-non-group branch from edf6b34 to 80ebca4 Compare September 8, 2022 20:14
@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #781 (80ebca4) into develop (bb1f57a) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #781      +/-   ##
===========================================
+ Coverage    58.72%   58.79%   +0.07%     
===========================================
  Files          153      153              
  Lines        17120    17123       +3     
===========================================
+ Hits         10053    10068      +15     
+ Misses        6129     6121       -8     
+ Partials       938      934       -4     
Impacted Files Coverage Δ
query/graphql/planner/select.go 76.44% <100.00%> (+1.44%) ⬆️
query/graphql/planner/planner.go 77.74% <0.00%> (+2.90%) ⬆️

@AndrewSisley AndrewSisley merged commit 9c04fee into develop Sep 8, 2022
@AndrewSisley AndrewSisley deleted the sisley/fix/I702-count-on-non-group branch September 8, 2022 20:30
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
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. 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.

Query panics when selecting _group without parent group by
2 participants