Skip to content

[Enhancement](grouping) Add a switch for users to force using alias name in group by and having clause - #15748

Merged
morningman merged 8 commits into
apache:masterfrom
xy720:add-swith-for-alias-first
Jan 31, 2023
Merged

[Enhancement](grouping) Add a switch for users to force using alias name in group by and having clause#15748
morningman merged 8 commits into
apache:masterfrom
xy720:add-swith-for-alias-first

Conversation

@xy720

@xy720xy720 commented Jan 9, 2023

Copy link
Copy Markdown
Member

Proposed changes

Issue Number: close#15747

Problem summary

Describe your changes.

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...

@github-actionsgithub-actionsBot added the area/planner Issues or PRs related to the query planner label Jan 9, 2023
@xy720xy720 changed the title [Enhancement] Add a switch for users to force using alias name in group by and having clause[Enhancement](grouping) Add a switch for users to force using alias name in group by and having clauseJan 9, 2023
@hello-stephen

hello-stephen commented Jan 9, 2023

Copy link
Copy Markdown
Contributor

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.8 seconds
load time: 515 seconds
storage size: 17122631353 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230130153334_clickbench_pr_87267.html

@yangzhg

Copy link
Copy Markdown
Member

add a regression test

@morningman

Copy link
Copy Markdown
Contributor

Please update variables.md doc

@xy720
xy720force-pushed the add-swith-for-alias-first branch from d50566d to 2c23154CompareJanuary 12, 2023 12:07
@github-actionsgithub-actionsBot added kind/docs Categorizes issue or PR as related to documentation. kind/test labels Jan 12, 2023
@xy720

Copy link
Copy Markdown
MemberAuthor

Update docs and add regression test

@xy720
xy720force-pushed the add-swith-for-alias-first branch 4 times, most recently from 396419d to fd464acCompareJanuary 18, 2023 05:36
@xy720
xy720force-pushed the add-swith-for-alias-first branch 3 times, most recently from 7ca6494 to ce956abCompareJanuary 28, 2023 22:04
}

substituteOrdinalsAliases(groupingExprs, "GROUP BY", analyzer, false);
boolean aliasFirst = ConnectContext.get().getSessionVariable().isGroupByAndHavingUseAliasFirst();

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.

The ConnectContext.get() may be null when replaying edit log

@xy720
xy720force-pushed the add-swith-for-alias-first branch from 2e4cda6 to 1a6e9fcCompareJanuary 30, 2023 12:01

@yangzhgyangzhg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Jan 31, 2023
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman
morningman merged commit cd45731 into apache:masterJan 31, 2023
morningman pushed a commit that referenced this pull request Jan 31, 2023
…ame in group by and having clause (#16176)
cherry-pic #15748 to 1.2-lts
englefly pushed a commit to englefly/incubator-doris that referenced this pull request Feb 1, 2023
dutyu pushed a commit to dutyu/doris that referenced this pull request Feb 1, 2023
dutyu pushed a commit to dutyu/doris that referenced this pull request Feb 6, 2023
morningman pushed a commit that referenced this pull request Apr 3, 2023
…using alias name in group by and having clause (#18327)
cherry-pick from #15748
morrySnow added a commit to morrySnow/incubator-doris that referenced this pull request Apr 25, 2024
this variable intro by apache#15748 for backward compatibility.
currently, it is used very infrequently.
Nereids do not support it anymore.
So, we tag it as deprecated, and will remove it future.
morrySnow added a commit that referenced this pull request Apr 26, 2024
)
this variable intro by #15748 for backward compatibility.
currently, it is used very infrequently.
Nereids do not support it anymore.
So, we tag it as deprecated, and will remove it in the future.
dataroaring pushed a commit that referenced this pull request Apr 27, 2024
)
this variable intro by #15748 for backward compatibility.
currently, it is used very infrequently.
Nereids do not support it anymore.
So, we tag it as deprecated, and will remove it in the future.
HappenLee pushed a commit to HappenLee/incubator-doris that referenced this pull request Apr 24, 2026
…che#34133)
this variable intro by apache#15748 for backward compatibility.
currently, it is used very infrequently.
Nereids do not support it anymore.
So, we tag it as deprecated, and will remove it in the future.
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 plannerdev/1.1.6-mergeddev/1.2.2-mergedkind/docsCategorizes issue or PR as related to documentation.kind/testreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Add a switch for users to force using alias name in group by and having clause

4 participants

@xy720@hello-stephen@yangzhg@morningman