Skip to content
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.

optimize metric aggregations order by #68

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

skjindal93
Copy link
Contributor

@skjindal93 skjindal93 commented Jan 17, 2021

Description

Keeping this as a draft PR, since none of the use cases need this optimization yet. The optimization comes into play when there is a filter on an attribute in EDS and order by on QS aggregations

Pushes the metric aggregation order by down as a selection, so that only required data is fetched for paginating in memory, instead of fetching all the data for pagination

Testing

Tested end to end

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@codecov
Copy link

codecov bot commented Jan 17, 2021

Codecov Report

Merging #68 (7c57ce4) into remove+get+aggregated+metrics (2a2068a) will increase coverage by 0.06%.
The diff coverage is 94.11%.

Impacted file tree graph

@@                         Coverage Diff                         @@
##             remove+get+aggregated+metrics      #68      +/-   ##
===================================================================
+ Coverage                            75.28%   75.34%   +0.06%     
- Complexity                            1043     1044       +1     
===================================================================
  Files                                  105      105              
  Lines                                 4794     4807      +13     
  Branches                               416      416              
===================================================================
+ Hits                                  3609     3622      +13     
  Misses                                1008     1008              
  Partials                               177      177              
Flag Coverage Δ Complexity Δ
unit 75.34% <94.11%> (+0.06%) 0.00 <1.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...way/service/entity/query/ExecutionTreeBuilder.java 85.53% <0.00%> (ø) 30.00 <0.00> (ø)
...gateway/service/entity/query/ExecutionContext.java 96.25% <100.00%> (+0.04%) 61.00 <1.00> (+1.00)
.../query/visitor/ExecutionContextBuilderVisitor.java 82.50% <100.00%> (+0.44%) 8.00 <0.00> (ø)
...service/entity/query/visitor/ExecutionVisitor.java 98.50% <100.00%> (+0.05%) 36.00 <0.00> (ø)

Continue to review full report at Codecov.

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

@github-actions
Copy link

Unit Test Results

  50 files  ±0    50 suites  ±0   5s ⏱️ -3s
299 tests ±0  299 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 7c57ce4. ± Comparison against base commit 2a2068a.

Base automatically changed from remove+get+aggregated+metrics to main January 17, 2021 19:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant