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: Aggregate order alias targeting #3293

Merged

Conversation

nasdf
Copy link
Member

@nasdf nasdf commented Dec 5, 2024

Relevant issue(s)

Resolves #3239
Resolves #2820

Description

This PR enables ordering by aggregated fields by using an alias to target them. This was mostly implemented in a previous PR, so the changes here are tests to verify that it works.

Tasks

  • I made sure the code is well commented, particularly hard-to-understand areas.
  • I made sure the repository-held documentation is changed accordingly.
  • I made sure the pull request title adheres to the conventional commit style (the subset used in the project can be found in tools/configs/chglog/config.yml).
  • I made sure to discuss its limitations such as threats to validity, vulnerability to mistake and misuse, robustness to invalidation of assumptions, resource requirements, ...

How has this been tested?

Added integration tests.

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

  • MacOS

@nasdf nasdf added the feature New feature or request label Dec 5, 2024
@nasdf nasdf added this to the DefraDB v0.15 milestone Dec 5, 2024
@nasdf nasdf self-assigned this Dec 5, 2024
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.10%. Comparing base (6cb3289) to head (9a0b284).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3293      +/-   ##
===========================================
+ Coverage    78.00%   78.10%   +0.10%     
===========================================
  Files          382      382              
  Lines        35364    35364              
===========================================
+ Hits         27583    27618      +35     
+ Misses        6138     6114      -24     
+ Partials      1643     1632      -11     
Flag Coverage Δ
all-tests 78.10% <100.00%> (+0.10%) ⬆️

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

Files with missing lines Coverage Δ
internal/db/base/compare.go 65.22% <100.00%> (+2.90%) ⬆️

... and 10 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 6cb3289...9a0b284. Read the comment docs.

"Author": []map[string]any{
{
"name": "John Grisham",
"totalRating": 13.600000000000001,
Copy link
Collaborator

Choose a reason for hiding this comment

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

thought: Yay for float precision.... lol

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 adding the tests ensuring this is implemented.

@nasdf nasdf merged commit 2776f1e into sourcenetwork:develop Dec 5, 2024
41 of 43 checks passed
@islamaliev
Copy link
Contributor

Bug bash result: ran different requests similar to integration tests. Everything works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aggregate order alias targeting Enable filtering one-many related objects by number of related objects
3 participants