You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "wangbo (via GitHub)" <gi...@apache.org> on 2023/02/14 02:36:50 UTC
[GitHub] [doris] wangbo opened a new pull request, #16459: [fix](planner)Fix colocate query failed
wangbo opened a new pull request, #16459:
URL: https://github.com/apache/doris/pull/16459
# Proposed changes
Issue Number: close #16458
## Problem summary
Describe your changes.
## Checklist(Required)
1. Does it affect the original behavior:
- [x] Yes
- [ ] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [x] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [x] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [x] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [x] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16459: [fix](planner)Fix colocate query failed
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16459:
URL: https://github.com/apache/doris/pull/16459#issuecomment-1420651649
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] wangbo closed pull request #16459: [fix](planner)Fix colocate query failed
Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo closed pull request #16459: [fix](planner)Fix colocate query failed
URL: https://github.com/apache/doris/pull/16459
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] cambyzju commented on a diff in pull request #16459: [fix](planner)Fix colocate query failed
Posted by "cambyzju (via GitHub)" <gi...@apache.org>.
cambyzju commented on code in PR #16459:
URL: https://github.com/apache/doris/pull/16459#discussion_r1105420597
##########
fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java:
##########
@@ -321,6 +321,10 @@ public void useBaseIndexId() {
this.selectedIndexId = olapTable.getBaseIndexId();
}
+ public long getSelectedIndexId() {
Review Comment:
add `@Override` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #16459: [fix](planner)Fix colocate query failed
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #16459:
URL: https://github.com/apache/doris/pull/16459#issuecomment-1420651593
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] wangbo commented on pull request #16459: [fix](planner)Fix colocate query failed
Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #16459:
URL: https://github.com/apache/doris/pull/16459#issuecomment-1421952756
UT DistributedPlannerTest.testBroadcastJoinCostThreshold is fixed.
Add more reg test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morrySnow commented on a diff in pull request #16459: [fix](planner)Fix colocate query failed
Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #16459:
URL: https://github.com/apache/doris/pull/16459#discussion_r1098567216
##########
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java:
##########
@@ -557,6 +557,12 @@ private boolean dataDistributionMatchEqPredicate(List<BinaryPredicate> eqJoinPre
cannotReason.add(DistributedPlanColocateRule.COLOCATE_GROUP_IS_NOT_STABLE);
return false;
}
+ } else {
+ // query same table but hit different rollup, colocate join should be disable
+ if (leftRoot.getSelectedIndexId() != rightRoot.getSelectedIndexId()) {
+ cannotReason.add(DistributedPlanColocateRule.QUERY_SAME_TABLE_BUT_HIT_DIFF_ROLLUP);
+ return false;
Review Comment:
if table is a colocate table, it could do colocate join with itself when group is stable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #16459: [fix](planner)Fix colocate query failed
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #16459:
URL: https://github.com/apache/doris/pull/16459#issuecomment-1420186361
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.31 seconds
load time: 474 seconds
storage size: 17170930960 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230207043049_clickbench_pr_91164.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morrySnow commented on a diff in pull request #16459: [fix](planner)Fix colocate query failed
Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #16459:
URL: https://github.com/apache/doris/pull/16459#discussion_r1105458743
##########
fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java:
##########
@@ -539,6 +539,14 @@ private boolean dataDistributionMatchEqPredicate(List<BinaryPredicate> eqJoinPre
// they are naturally colocate relationship no need to check colocate group
Collection<Long> leftPartitions = leftRoot.getSelectedPartitionIds();
Collection<Long> rightPartitions = rightRoot.getSelectedPartitionIds();
+
+ // For UT or no partition is selected, getSelectedIndexId() == -1, see selectMaterializedView()
+ // boolean hitSameIndex = (leftTable.getId() == rightTable.getId())
+ // && (leftRoot.getSelectedIndexId() != -1 && rightRoot.getSelectedIndexId() != -1)
+ // && (leftRoot.getSelectedIndexId() == rightRoot.getSelectedIndexId());
+ //
+ // boolean noNeedCheckColocateGroup = hitSameIndex && (leftPartitions.equals(rightPartitions))
+ // && (leftPartitions.size() <= 1);
Review Comment:
mis-comment the new code?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] wangbo commented on pull request #16459: (#16458)Fix colocate query failed
Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on PR #16459:
URL: https://github.com/apache/doris/pull/16459#issuecomment-1420172435
I will add regression test later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] yiguolei merged pull request #16459: [fix](planner)Fix colocate query failed
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #16459:
URL: https://github.com/apache/doris/pull/16459
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] wangbo commented on a diff in pull request #16459: [fix](planner)Fix colocate query failed
Posted by "wangbo (via GitHub)" <gi...@apache.org>.
wangbo commented on code in PR #16459:
URL: https://github.com/apache/doris/pull/16459#discussion_r1105427246
##########
fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java:
##########
@@ -321,6 +321,10 @@ public void useBaseIndexId() {
this.selectedIndexId = olapTable.getBaseIndexId();
}
+ public long getSelectedIndexId() {
Review Comment:
```getSelectedIndexId``` only exists in ```OlapScanNode```.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org