Skip to content

feat(cubesql): Support trivial casts in member pushdown #9480

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

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

Conversation

mcheshkov
Copy link
Member

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

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

This should allow pushing down expressions like CAST(dimension AS TEXT) AS alias into CubeScan as regular dimensions.
This should allow __cubeJoinField joins to see more CubeScans

Supporting changes:

Remove unused rule for member pushdown from AllMembers
All matching happening with CubeScanMembers on top of actual members node, and this rule does not expect that
member_name_to_expr part of analysis can extract members from CubeScanMembers(AllMembers), so there's no reason to keep this rule

Add explicit type in var! macro, to avoid type confusion.

…bers

All matching happening with CubeScanMembers on top of actual members node, and this rule does not expect that
member_name_to_expr part of analysis can extract members from CubeScanMembers(AllMembers), so there's no reason to keep this rule
@mcheshkov mcheshkov force-pushed the member-pushdown-cast branch from 28db177 to a7c10cd Compare April 16, 2025 13:29
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

Attention: Patch coverage is 98.38710% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.65%. Comparing base (e7901a7) to head (a7c10cd).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...besql/cubesql/src/compile/rewrite/rules/members.rs 97.43% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9480       +/-   ##
===========================================
+ Coverage   48.03%   76.65%   +28.61%     
===========================================
  Files         171      400      +229     
  Lines       21449   105018    +83569     
  Branches     3723     3724        +1     
===========================================
+ Hits        10303    80500    +70197     
- Misses      10714    24086    +13372     
  Partials      432      432               
Flag Coverage Δ
cube-backend 48.02% <ø> (-0.02%) ⬇️
cubesql 84.00% <98.38%> (?)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcheshkov mcheshkov marked this pull request as ready for review April 16, 2025 14:06
@mcheshkov mcheshkov requested a review from a team as a code owner April 16, 2025 14:06
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