-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Feature configurable calcite bloat #16248
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,9 +84,9 @@ | |
System.getProperty(HEP_DEFAULT_MATCH_LIMIT_CONFIG_STRING, "1200") | ||
); | ||
private static final String BLOAT_PROPERTY = "druid.sql.planner.bloat"; | ||
private static final int BLOAT = Integer.parseInt( | ||
System.getProperty(BLOAT_PROPERTY, "100") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the druid planner we'll not like at all if multiple projects are kep on top of eachother... the default seems to be the same ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, considering that this is primarily a workaround for a potential Calcite problem, I'm hesitant to increase the default value that much. However, I agree that raising the default to at least 1000 would be a good compromise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah - I agree...an off switch would be better than tweaking an integer; |
||
); | ||
|
||
/** | ||
* Rules from {@link org.apache.calcite.plan.RelOptRules#BASE_RULES}, minus: | ||
|
@@ -100,6 +100,10 @@ | |
* and {@link CoreRules#FILTER_INTO_JOIN}, which are part of {@link #FANCY_JOIN_RULES}. | ||
* 4) {@link CoreRules#PROJECT_FILTER_TRANSPOSE} because PartialDruidQuery would like to have the Project on top of the Filter - | ||
* this rule could create a lot of non-useful plans. | ||
* | ||
* {@link CoreRules#PROJECT_MERGE} includes configurable bloat parameter, as a workaround for Calcite exception | ||
* (there are not enough rules to produce a node with desired properties) thrown while running complex sql-queries with | ||
* big amount of subqueries. `druid.sql.planner.bloat` should be set in broker's `jvm.config` file. | ||
*/ | ||
private static final List<RelOptRule> BASE_RULES = | ||
ImmutableList.of( | ||
|
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 should be passed via context parameter or through runtime property. A context param seems a better fit as it would allow you to run those complex queries without having any impact on the rest of the queries.
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.
Good point, thanks! I will have a look
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.
Updated to use context parameter