-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[refactor](planner)Cancel the return value default 65535 limit #12478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| newDefaultOrderByLimit = 65535; | ||
| if (analyzer.getContext().getSessionVariable().defaultOrderByLimit <= -1) { | ||
| newDefaultOrderByLimit = Long.MAX_VALUE; | ||
| LOG.warn("The current default Order By Limit number is the maximum value of Long."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the warn log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has been completed
| LOG.warn("The current default Order By Limit number is the maximum value of Long."); | ||
| } else { | ||
| newDefaultOrderByLimit = analyzer.getContext().getSessionVariable().defaultOrderByLimit; | ||
| LOG.warn("The current default Order By Limit number is {}." + newDefaultOrderByLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove warn log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has been completed
| newDefaultOrderByLimit = Long.MAX_VALUE; | ||
| LOG.warn("The current default Order By Limit number is the maximum value of Long."); | ||
| } else { | ||
| newDefaultOrderByLimit = analyzer.getContext().getSessionVariable().defaultOrderByLimit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just call analyzer.getContext().getSessionVariable().defaultOrderByLimit once
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has been completed
|
|
||
| // Default Order By Limit | ||
| @VariableMgr.VarAttr(name = DEFAULT_ORDER_BY_LIMIT) | ||
| public long defaultOrderByLimit = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has been completed
Signed-off-by: Yijia Su <suyijia@selectdb.com>
13f568d to
3d70ebd
Compare
|
TeamCity pipeline, clickbench performance test result: |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…12478) Originally, Order By Limit returned a maximum of 65535 rows of data by default during the query, but now many businesses do not apply this limit. It is necessary to add larger data after the query statement to complete the full data query, which is extremely inconvenient, so adjustments have been made. At the same time, I added the variable DEFAULT_ORDER_BY_LIMIT to the SessionVariable, the default value is -1, if the user does not use the LIMIT keyword or the LIMIT value is a negative integer, the default query return value is Long.MAX_VALUE. If the corresponding maximum query value is set, the number of data items is returned according to the maximum query value or the value followed by the LIMIT keyword.
Proposed changes
Originally, Order By Limit returned a maximum of 65535 rows of data by default during the query, but now many businesses do not apply this limit. It is necessary to add larger data after the query statement to complete the full data query, which is extremely inconvenient, so adjustments have been made.
At the same time, I added the variable DEFAULT_ORDER_BY_LIMIT to the SessionVariable, the default value is -1, if the user does not use the LIMIT keyword or the LIMIT value is a negative integer, the default query return value is Long.MAX_VALUE. If the corresponding maximum query value is set, the number of data items is returned according to the maximum query value or the value followed by the LIMIT keyword.
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)
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...