Skip to content

Do not add exchange when table's distributioin satisfy the distribution requirements - #4482

Merged
morningman merged 2 commits into
apache:masterfrom
liutang123:4481
Sep 1, 2020
Merged

Do not add exchange when table's distributioin satisfy the distribution requirements#4482
morningman merged 2 commits into
apache:masterfrom
liutang123:4481

Conversation

@liutang123

Copy link
Copy Markdown
Contributor

For #4481.

Proposed changes

In DistributedPlanner, do not add the unnecessary Exchanges.
For case 1, we only need to judge that the table's distribute hash keys is a subset of the aggregate keys.
For case 2, we should jude two conditions:

  • partition keys are also hash keys.
  • the table's distribute hash keys is a subset of the aggregate keys.

…on requirements
For apache#4481.
In DistributedPlanner, do not add the unnecessary Exchanges.
For case 1, we only need to judge that the table's distribute hash keys is a subset of the aggregate keys.
For case 2, we should jude two conditions:
- partition keys are also hash keys.
- the table's distribute hash keys is a subset of the aggregate keys.
Comment threadfe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java Outdated
Comment threadfe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java Outdated
Comment threadfe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java Outdated

@kangkaisenkangkaisen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@kangkaisenkangkaisen added approved Indicates a PR has been approved by one committer. area/planner Issues or PRs related to the query planner kind/improvement labels Aug 31, 2020
@morningman
morningman merged commit f3a9f3f into apache:masterSep 1, 2020
ZhangYu0123 pushed a commit to ZhangYu0123/incubator-doris that referenced this pull request Sep 1, 2020
…on requirements (apache#4482)
In DistributedPlanner, do not add the unnecessary Exchanges.
For case 1, we only need to judge that the table's distribute hash keys is a subset of the aggregate keys.
For case 2, we should judge two conditions:
- partition keys are also hash keys.
- the table's distribute hash keys is a subset of the aggregate keys.
@yangzhgyangzhg mentioned this pull request Feb 9, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.area/plannerIssues or PRs related to the query plannerkind/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@liutang123@kangkaisen@morningman