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: Resolve aggregates' mapping with deep nested subtypes #1175

Merged
merged 11 commits into from
Mar 14, 2023

Conversation

islamaliev
Copy link
Contributor

Relevant issue(s)

Resolves #833 #920

Description

When resolving mapping for an aggregate it will check now if nested orderby or filter subtypes (if any) are dealing with an object (that is in a relation with the current one that the aggregate query is being running on) as opposed to just a single field on the current object.

@islamaliev islamaliev added bug Something isn't working area/api Related to the external API component labels Mar 10, 2023
@islamaliev islamaliev self-assigned this Mar 10, 2023
@islamaliev islamaliev changed the title fix: Resolve aggregates' mapping with deep nested subtypes (orderby and filter) #833 fix: Resolve aggregates' mapping with deep nested subtypes (orderby and filter) Mar 10, 2023
@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Merging #1175 (39c93b4) into develop (3979fa7) will decrease coverage by 0.17%.
The diff coverage is 95.00%.

❗ Current head 39c93b4 differs from pull request most recent head 2f5d9ab. Consider uploading reports for the commit 2f5d9ab to get more accurate results

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1175      +/-   ##
===========================================
- Coverage    68.59%   68.42%   -0.17%     
===========================================
  Files          180      181       +1     
  Lines        17012    17041      +29     
===========================================
- Hits         11669    11660       -9     
- Misses        4387     4415      +28     
- Partials       956      966      +10     
Impacted Files Coverage Δ
planner/mapper/mapper.go 86.26% <94.80%> (+0.18%) ⬆️
core/doc.go 96.72% <100.00%> (+2.50%) ⬆️

... and 13 files with indirect coverage changes

@source-devs
Copy link

Benchmark Results

Summary

  • 0 Benchmarks successfully compared.
  • 0 Benchmarks were ✅ Better.
  • 0 Benchmarks were ❌ Worse .
  • 0 Benchmarks were ✨ Unchanged.
✅ See Better Results...
time/opdelta
 
❌ See Worse Results...
time/opdelta
 
✨ See Unchanged Results...
time/opdelta
 
🐋 See Full Results...

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.

Cheers Islam - changes look good. Have two quick todo for you RE test location and framework but otherwise all good.

Not sure how I feel about getDocs 😁 but we should perhaps let it sit for a while in develop before we as a team commit to/against it.

Congrats on your first Source PR :)

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.

Congrats on your first PR with us Islam :)

I only have a minor nitpick that you can choose to apply or not. I'll leave it to Andy to approve once his feedback has been applied.

planner/mapper/mapper.go Show resolved Hide resolved
planner/mapper/mapper.go Outdated Show resolved Hide resolved
planner/mapper/mapper.go Outdated Show resolved Hide resolved
@jsimnz jsimnz added the action/no-benchmark Skips the action that runs the benchmark. label Mar 12, 2023
@islamaliev islamaliev changed the title fix: Resolve aggregates' mapping with deep nested subtypes (orderby and filter) fix: Resolve aggregates' mapping with deep nested subtypes Mar 13, 2023
@islamaliev islamaliev force-pushed the islam/fix/panic-by-deep-nested-orderby branch from ee2066d to 39c93b4 Compare March 13, 2023 13:33
@islamaliev islamaliev requested a review from AndrewSisley March 14, 2023 10:10
@islamaliev islamaliev force-pushed the islam/fix/panic-by-deep-nested-orderby branch from 39c93b4 to 36d6867 Compare March 14, 2023 10:13
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 - cheers for the fix, the discussions, and congrats on getting this in :)

@islamaliev islamaliev merged commit eb1fae4 into develop Mar 14, 2023
@islamaliev islamaliev deleted the islam/fix/panic-by-deep-nested-orderby branch March 14, 2023 16:39
shahzadlone pushed a commit that referenced this pull request Apr 13, 2023
* Fix recursive call to CloneWithoutRender
* Fix deep orderby
* Map properly aggregates with deep filter
* Flatten test actions
  Update new test framework so that it allows to adding slices to the slice of actions
* Switch to new testing framework
  Make all test in tests/integration/query/one_to_many_to_one use new testing framework
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
…work#1175)

* Fix recursive call to CloneWithoutRender
* Fix deep orderby
* Map properly aggregates with deep filter
* Flatten test actions
  Update new test framework so that it allows to adding slices to the slice of actions
* Switch to new testing framework
  Make all test in tests/integration/query/one_to_many_to_one use new testing framework
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/api Related to the external API component bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve panics caused by deeper nested orderby
5 participants