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

feat(tesseract): Pre-aggregation planning fallback #9230

Open
wants to merge 1 commit into
base: tesseract-exclude-values-from-filter-params
Choose a base branch
from

Conversation

waralexrom
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

Issue Reference this PR resolves

[For example #12]

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

[Description goes here]

@waralexrom waralexrom requested review from a team as code owners February 17, 2025 15:30
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.34%. Comparing base (06ae94b) to head (ab46752).

Additional details and impacted files
@@                               Coverage Diff                               @@
##           tesseract-exclude-values-from-filter-params    #9230      +/-   ##
===============================================================================
- Coverage                                        83.40%   83.34%   -0.06%     
===============================================================================
  Files                                              227      227              
  Lines                                            81338    81062     -276     
===============================================================================
- Hits                                             67836    67560     -276     
  Misses                                           13502    13502              
Flag Coverage Δ
cubesql 83.34% <ø> (-0.06%) ⬇️

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.

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.

Mostly looks good. Left some minor notes and typos fixes...

@@ -278,11 +278,9 @@ export class BaseQuery {
return dimension;
}).filter(R.identity).map(this.newTimeDimension.bind(this));
this.allFilters = this.timeDimensions.concat(this.segments).concat(this.filters);
this.useNativeSqlPlanner = this.options.useNativeSqlPlanner ?? getEnv('nativeSqlPlanner');
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to add .default('false') to this env so the useNativeSqlPlanner can be always bool.

@@ -603,33 +609,61 @@ export class BaseQuery {
return false;
}

newQueryNotUseNative() {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
newQueryNotUseNative() {
newQueryWithoutNative() {

Comment on lines +640 to +644
if (this.options.disableExternalPreAggregations && preAggForQuery && preAggForQuery.preAggregation.external) {
preAggForQuery = undefined;
}
if (preAggForQuery) {
isRelatedToPreAggregation = true;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like these 2 ifs can be combined into one. Smth like:

if (!(this.options.disableExternalPreAggregations && 
preAggForQuery && 
preAggForQuery.preAggregation.external)) {
  isRelatedToPreAggregation = true;

@@ -2960,6 +2994,7 @@ export class BaseQuery {
}

newSubQueryForCube(cube, options) {
options = { ...options, useNativeSqlPlanner: false }; // We not use tesseract for pre-aggregations generation yet
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
options = { ...options, useNativeSqlPlanner: false }; // We not use tesseract for pre-aggregations generation yet
options = { ...options, useNativeSqlPlanner: false }; // We don't use tesseract for pre-aggregations generation yet

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