Skip to content

[fix](nereids) bind sort key priority problem#15646

Merged
morrySnow merged 5 commits intoapache:masterfrom
englefly:sort-binding-on-grandson
Jan 10, 2023
Merged

[fix](nereids) bind sort key priority problem#15646
morrySnow merged 5 commits intoapache:masterfrom
englefly:sort-binding-on-grandson

Conversation

@englefly
Copy link
Copy Markdown
Contributor

@englefly englefly commented Jan 5, 2023

Proposed changes

Problem summary

  1. add strict mode for SlotBinder. in strict mode, binding must matches qualifier
  2. for sort key binding, we first use strict mode, then loose mode

cases:

table t (int a, int b)
case1. select a as b from t order by t.b
case2. select a as b from t order by b
case3. select a as b from t order by t.b + b

TODO:

  1. bind on grandson

currently,
sort
+---project
+-----grandSon

sort key can be bound on project.output and grandSon.output.
But there are some cases in which sort key should be bound on the output of grandSon's children.
For example grandSon is
t1 join ( t2 join t3)
and order key is t3.x

  1. similar problems in group by
    case1. select a as b from t group by t.b
    case2. select a as b from t group by b
    case3. select a as b from t group by t.b + b

Issue Number: close #xxx

Checklist(Required)

  1. Does it affect the original behavior:
    • Yes
    • No
    • I don't know
  2. Has unit tests been added:
    • Yes
    • No
    • No Need
  3. Has document been added or modified:
    • Yes
    • No
    • No Need
  4. Does it need to update dependencies:
    • Yes
    • No
  5. Are there any changes that cannot be rolled back:
    • Yes (If Yes, please explain WHY)
    • No

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@englefly englefly force-pushed the sort-binding-on-grandson branch from 3caa85f to d8ec070 Compare January 5, 2023 08:34
@englefly englefly marked this pull request as draft January 5, 2023 09:30
@englefly englefly marked this pull request as draft January 5, 2023 09:30
@englefly englefly force-pushed the sort-binding-on-grandson branch from 0f5e76b to 75bd482 Compare January 5, 2023 11:14
@hello-stephen
Copy link
Copy Markdown
Contributor

hello-stephen commented Jan 5, 2023

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 36.67 seconds
load time: 507 seconds
storage size: 17122518974 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230110103023_clickbench_pr_76680.html

@englefly englefly marked this pull request as ready for review January 8, 2023 08:35
@englefly englefly force-pushed the sort-binding-on-grandson branch from db8c0b3 to 8075cb8 Compare January 9, 2023 11:53
morrySnow
morrySnow previously approved these changes Jan 10, 2023
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Jan 10, 2023
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@englefly englefly force-pushed the sort-binding-on-grandson branch from 8075cb8 to ad2b705 Compare January 10, 2023 07:03
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jan 10, 2023
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 10, 2023
@github-actions
Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@morrySnow morrySnow merged commit 280603b into apache:master Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/nereids kind/test reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants