Skip to content

Conversation

@Astralidea
Copy link
Contributor

@Astralidea Astralidea commented Sep 1, 2020

Proposed changes

详细背景介绍在 Fix #4503
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

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.

  • I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I have updated the document
  • [] Any dependent changes have been merged

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

代码可能写得不优雅,看看怎么去解决这个问题比较好。

@Astralidea Astralidea changed the title Support SELECT Optimizer Hints SET_VAR [Feature]Support SELECT Optimizer Hints SET_VAR Sep 1, 2020
@chaoyli
Copy link
Contributor

chaoyli commented Sep 3, 2020

A good job

chaoyli
chaoyli previously approved these changes Sep 3, 2020
@morningman
Copy link
Contributor

Hi @Astralidea
Thanks for your contribution, and could you please update the document?
I think you can put it in docs/en/administrator-guide/variables.md and docs/zh-CN/administrator-guide/variables.md.
For English, you can rely on translate.google.com

@morningman morningman added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 3, 2020
@Astralidea
Copy link
Contributor Author

Astralidea commented Sep 3, 2020

Hi @Astralidea
Thanks for your contribution, and could you please update the document?
I think you can put it in docs/en/administrator-guide/variables.md and docs/zh-CN/administrator-guide/variables.md.
For English, you can rely on translate.google.com

I have updated the document, you can see if there is any need to change.

@kangkaisen
Copy link
Contributor

@Astralidea Good job!. Please add a UT.

@Astralidea
Copy link
Contributor Author

@Astralidea Good job!. Please add a UT.

好的。UT我之前看了一下,貌似不太好加,我得想想怎么加。

@kangkaisen
Copy link
Contributor

@Astralidea Good job!. Please add a UT.

好的。UT我之前看了一下,貌似不太好加,我得想想怎么加。

或许可以把你的逻辑加到SelectStmt 的 analyze 方法里面,这样 SelectStmtTest 就可以直接测试,确认session 变量是否生效。

不过需要注意 context.getSessionVariable().toThrift() 要在 SelectStmt.analyze(analyzer) 之后,你可以试下。

@Astralidea
Copy link
Contributor Author

@Astralidea Good job!. Please add a UT.

好的。UT我之前看了一下,貌似不太好加,我得想想怎么加。

或许可以把你的逻辑加到SelectStmt 的 analyze 方法里面,这样 SelectStmtTest 就可以直接测试,确认session 变量是否生效。

不过需要注意 context.getSessionVariable().toThrift() 要在 SelectStmt.analyze(analyzer) 之后,你可以试下。

我改写一下DorisAssert框架可以测了。

Copy link
Contributor

@kangkaisen kangkaisen left a comment

Choose a reason for hiding this comment

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

+1

@morningman morningman merged commit bcb443f into apache:master Sep 6, 2020
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal]Support SELECT Optimizer Hints SET_VAR

4 participants