-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Colocate plan][Step1] Colocate join covers more situations #5521
Conversation
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
Outdated
Show resolved
Hide resolved
The order of import should comply with http://doris.apache.org/master/zh-CN/developer-guide/fe-eclipse-dev.html#%E4%BB%A3%E7%A0%81%E6%9B%B4%E6%96%B0 |
changed |
removed |
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.
LGTM
Collections.shuffle(list); | ||
backends.add(list.get(0)); | ||
if (FeConstants.runningUnitTest) { | ||
backends.addAll(list); |
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.
why add all?
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.
If it is a test, add all the backends belonging to this ip.
@VariableMgr.VarAttr(name = DISABLE_COLOCATE_JOIN) | ||
public boolean disableColocateJoin = false; | ||
@VariableMgr.VarAttr(name = DISABLE_COLOCATE_PLAN) | ||
public boolean disableColocatePlan = false; |
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.
Why changing the name?
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.
Because the previous configuration name is colocate join
. It only controls the colocate of the join.
Now this new configuration uniformly controls the colocate of all plan node.
So it would be too one-sided to call colocate join
.
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
Outdated
Show resolved
Hide resolved
The old colocate join can only cover the case where the child is hash or scan. In fact, as long as the child's data distribution meets the requirements, no matter what the plan node on the child node is, a colocate join can be performed.
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.
LGTM
Proposed changes
There are 4 steps in colocate plan: join, agg, sort and set operation.
This is the first step.
The old colocate join can only cover the case where the child is hash or scan.
In fact, as long as the child's data distribution meets the requirements,
no matter what the plan node on the child node is, a colocate join can be performed.
Types of changes
What types of changes does your code introduce to Doris?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
document is comming