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(api-gateway) fix(schema-compiler): fixes an issue where queries t… #8060

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rdwoodring
Copy link
Contributor

fix(api-gateway) fix(schema-compiler): fixes an issue where queries to get the total count of results were incorrectly applying sorting from the original query and also were getting default ordering applied when the query ordering was stripped out

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

#7446

Description of Changes Made (if issue reference is not provided)

  • updates api gateway to remove order field from queries that are getting a count of total results matching
  • updates the base query's logic for defaulting order so that it does an early return and does not default order if the query is getting the total (follows the same path as the logic doing an early return for preaggreation queries)

Ryan Woodring added 2 commits April 1, 2024 13:03
…o get the total count of results were incorrectly applying sorting from the original query and also were getting default ordering applied when the query ordering was stripped out
@rdwoodring rdwoodring requested review from a team as code owners April 1, 2024 17:16
Copy link

vercel bot commented Apr 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-angular-dashboard ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-react-d3 ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-react-dashboard ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-react-data-table ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-react-highcharts ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-react-material-ui ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-react-pivot-table ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm
examples-vue-query-builder ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2024 5:17pm

@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Apr 1, 2024
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 47.92%. Comparing base (2ca99de) to head (cb7ecb9).
Report is 2 commits behind head on master.

Files Patch % Lines
packages/cubejs-api-gateway/src/gateway.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8060      +/-   ##
==========================================
+ Coverage   47.90%   47.92%   +0.02%     
==========================================
  Files         154      154              
  Lines       21034    21035       +1     
  Branches     5422     5422              
==========================================
+ Hits        10077    10082       +5     
+ Misses      10203    10199       -4     
  Partials      754      754              
Flag Coverage Δ
cube-backend 47.92% <50.00%> (+0.02%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@igorlukanin
Copy link
Member

igorlukanin commented Apr 2, 2024

Thanks for your contribution, @rdwoodring! I've assigned this to @paveltiunov so he can do a review.

@rdwoodring
Copy link
Contributor Author

@paveltiunov any idea when you'll get a chance to review this or get it pulled in? I've been running on a fork in production and would ideally like to see this pulled so I can get back onto the official images

@paveltiunov
Copy link
Member

@rdwoodring Thanks for contributing! We'd need E2E tests for that. You can put it in the Postgres smoke test.

@rdwoodring
Copy link
Contributor Author

Any specific tests you'd like to see, @paveltiunov ? Just that queries with totalQuery return results without an error? Or can I actually test what query is being generated against the database to see that it does not have an order by?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants