-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(tesseract): Pre-aggregation planning fallback #9230
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9230 +/- ##
=======================================
Coverage 83.69% 83.69%
=======================================
Files 228 228
Lines 82016 82016
=======================================
Hits 68640 68640
Misses 13376 13376
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this 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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -603,33 +609,61 @@ export class BaseQuery { | |||
return false; | |||
} | |||
|
|||
newQueryNotUseNative() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newQueryNotUseNative() { | |
newQueryWithoutNative() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if (this.options.disableExternalPreAggregations && preAggForQuery && preAggForQuery.preAggregation.external) { | ||
preAggForQuery = undefined; | ||
} | ||
if (preAggForQuery) { | ||
isRelatedToPreAggregation = true; |
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current version seems more readable to me. In any case, this is a very temporary solution
@@ -2960,6 +2994,7 @@ export class BaseQuery { | |||
} | |||
|
|||
newSubQueryForCube(cube, options) { | |||
options = { ...options, useNativeSqlPlanner: false }; // We not use tesseract for pre-aggregations generation yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
06ae94b
to
4a80bc5
Compare
ab46752
to
cc70404
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
cc70404
to
10bdac5
Compare
Check List
Issue Reference this PR resolves
[For example #12]
Description of Changes Made (if issue reference is not provided)
[Description goes here]