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(cubesql): Fix SELECT DISTINCT on pushdown #9144

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

Conversation

KSDaemon
Copy link
Member

@KSDaemon KSDaemon commented Jan 27, 2025

This PR fixes correct Cube query generation for SELECT DISTINCT xxxx queries via SQL API.

Check List

  • Tests have 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

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 98.47909% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.39%. Comparing base (18909fe) to head (ef28dc7).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...besql/cubesql/src/compile/rewrite/rules/members.rs 95.18% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9144      +/-   ##
==========================================
+ Coverage   83.34%   83.39%   +0.04%     
==========================================
  Files         227      227              
  Lines       81062    81323     +261     
==========================================
+ Hits        67560    67818     +258     
- Misses      13502    13505       +3     
Flag Coverage Δ
cubesql 83.39% <98.47%> (+0.04%) ⬆️

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.

@KSDaemon KSDaemon force-pushed the fix/select-distinct branch from 62aefac to b9cf2bb Compare January 27, 2025 18:51
@KSDaemon KSDaemon marked this pull request as ready for review January 27, 2025 21:29
@KSDaemon KSDaemon requested a review from a team as a code owner January 27, 2025 21:29
@KSDaemon KSDaemon force-pushed the fix/select-distinct branch from f326180 to 3316caf Compare January 27, 2025 21:29
@KSDaemon KSDaemon force-pushed the fix/select-distinct branch from 84fdb24 to b69b1a1 Compare February 7, 2025 09:36
@KSDaemon KSDaemon force-pushed the fix/select-distinct branch from 81ba359 to 0e6adb0 Compare February 7, 2025 14:16
Copy link
Member

@mcheshkov mcheshkov left a comment

Choose a reason for hiding this comment

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

One major issue is queries like this: SELECT DISTINCT * FROM cube1 JOIN cube2 ON cube1.__cubeJoinField = cube2.__cubeJoinField. Both cubes have to be dimensions-only.
Other comments - just nitpicking

@KSDaemon KSDaemon force-pushed the fix/select-distinct branch from e22bbe7 to ef28dc7 Compare February 7, 2025 16:59
@KSDaemon KSDaemon requested a review from mcheshkov February 7, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants