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): Generate proper projection wrapper for duplicated members #9233

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

mcheshkov
Copy link
Member

@mcheshkov mcheshkov commented Feb 17, 2025

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)

CubeScanWrapperNode::generate_sql_for_node does not handle duplicated members in member_fields. It results in missing realiasing projection, as it generate only one column for each member. This PR introduces realiasing to make those columns reappear.

CubeScanExecutionPlan implements this by iterating over member_fields while building columns, so each member in member_fields will get it’s own column in DF anyway.

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.65%. Comparing base (31a7a04) to head (053c05e).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9233      +/-   ##
==========================================
+ Coverage   83.64%   83.65%   +0.01%     
==========================================
  Files         227      227              
  Lines       81576    81646      +70     
==========================================
+ Hits        68234    68304      +70     
  Misses      13342    13342              
Flag Coverage Δ
cubesql 83.65% <100.00%> (+0.01%) ⬆️

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.

@mcheshkov mcheshkov force-pushed the duplicated-members-sql branch from 2c3607f to 405dc1f Compare February 17, 2025 20:23
@mcheshkov mcheshkov marked this pull request as ready for review February 17, 2025 22:14
@mcheshkov mcheshkov requested review from a team as code owners February 17, 2025 22:14
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

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

👍🏻 LGTM!

@ovr ovr requested a review from MazterQyou February 18, 2025 11:03
@mcheshkov mcheshkov force-pushed the duplicated-members-sql branch 3 times, most recently from aa1ff5c to ee983ad Compare February 24, 2025 13:40
@mcheshkov mcheshkov force-pushed the duplicated-members-sql branch from ee983ad to 053c05e Compare February 24, 2025 22:03
@mcheshkov mcheshkov merged commit aba6430 into master Feb 24, 2025
83 checks passed
@mcheshkov mcheshkov deleted the duplicated-members-sql branch February 24, 2025 22:37
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.

3 participants