Skip to content

Conversation

@KSDaemon
Copy link
Member

@KSDaemon KSDaemon commented May 2, 2025

This PR fixes the case when the request has a measure that is not treated as multiplied (e.g. no dimensions requested), but the same measure in the pre-aggregation is stored as multiplied, because of existence of miltiplier-dimension. Previously such queries were served by pre-agg, while it should not.

Depends on #9538

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

@KSDaemon KSDaemon changed the title Fix/multiplied measure hit pre agg fix(schema-compiler): Reject pre-agg if measure is unmultiplied in query but multiplied in pre-agg May 2, 2025
@codecov
Copy link

codecov bot commented May 2, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 61.68%. Comparing base (954bda4) to head (f1f89ef).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ejs-schema-compiler/src/adapter/PreAggregations.ts 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9541      +/-   ##
==========================================
+ Coverage   61.64%   61.68%   +0.03%     
==========================================
  Files         174      174              
  Lines       14474    14486      +12     
  Branches     2576     2579       +3     
==========================================
+ Hits         8923     8935      +12     
+ Misses       5169     5168       -1     
- Partials      382      383       +1     
Flag Coverage Δ
cube-backend 61.67% <93.33%> (+0.03%) ⬆️

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.

@KSDaemon KSDaemon force-pushed the fix/multiplied-measure-hit-pre-agg branch from b659fb7 to eb5f53f Compare May 2, 2025 15:48
@KSDaemon KSDaemon marked this pull request as ready for review May 2, 2025 16:38
@KSDaemon KSDaemon requested a review from a team as a code owner May 2, 2025 16:38
@KSDaemon KSDaemon force-pushed the chore/preaggs-2-ts branch from 18237b0 to c54aa36 Compare May 7, 2025 16:04
@KSDaemon KSDaemon requested a review from a team as a code owner May 7, 2025 16:04
@KSDaemon KSDaemon force-pushed the fix/multiplied-measure-hit-pre-agg branch 3 times, most recently from 82ef5fe to 438d2da Compare May 8, 2025 16:21
@KSDaemon KSDaemon force-pushed the chore/preaggs-2-ts branch from e7f8c9f to 93cf873 Compare May 8, 2025 16:51
@KSDaemon KSDaemon force-pushed the fix/multiplied-measure-hit-pre-agg branch from f69f933 to d65366e Compare May 8, 2025 16:51
Base automatically changed from chore/preaggs-2-ts to master May 8, 2025 17:15
@KSDaemon KSDaemon force-pushed the fix/multiplied-measure-hit-pre-agg branch from d65366e to f1f89ef Compare May 8, 2025 17:17
@KSDaemon KSDaemon merged commit f094d09 into master May 8, 2025
59 checks passed
@KSDaemon KSDaemon deleted the fix/multiplied-measure-hit-pre-agg branch May 8, 2025 17:40
marianore-muttdata pushed a commit to MuttData/cube that referenced this pull request Jun 17, 2025
…ery but multiplied in pre-agg (cube-js#9541)

* fix(schema-compiler): Reject pre-agg if measure is unmultiplied in query but multiplied in pre-agg

* add tests

* another type fixes
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