-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Change type of sum, min, max function column in mv #4199
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
If the agg function is sum, the type of mv column will be bigint. The only exception is that if the base column is largeint, the type of mv column will be largeint. If the agg function is min or max, the type of mv column will be same as the type of base column. For example, the type of mv column is smallint when the agg function is min. Change-Id: I1b541fd03342ceba093c4aabd8a29793c52781dc
|
Please add a UT to cover this PR. |
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
Show resolved
Hide resolved
Change-Id: Id451b0f7b334e265e1b495ee0aa47a686fffc1ee
Change-Id: Iffb7d3d7cbac6e98f4f358dd7c98a7d0dea2d4fc
Added |
@EmmyMiao87 Hi. for sum(double), sum(decimal), the type of mv column will also be bigint? |
…v column will be bigint. Otherwise, the type of mv column is same as the type of base column. Change-Id: I39b869c18a24b2e8506bfbea22be781488132d69
Fixed |
| || baseColumnType == PrimitiveType.INT) { | ||
| type = Type.BIGINT; | ||
| } else { | ||
| type = Type.fromPrimitiveType(baseColumnRef.getType().getPrimitiveType()); |
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.
Sum float result type should be double.
Change-Id: I14387f5b1a3654e8c9fe9d8f46f78d51a8ab7ce1
kangkaisen
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.
+1
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
Revert “Change type of sum, min, max function column in mv” This pr is revert pr #4199 . The daily test is cored when the type of mv column has been changed. So I revert the pr. The daily core will be fixed in the future. After that, the pr#4199 will be enable. Change-Id: Ie04fcfacfcd38480121addc5e454093d4ae75181
…r line delimiter (apache#53374) (apache#4199) pick [(apache#53374)](apache#53374) Multiple concurrent split file locations will be determined in plan phase, if the split point happens to be in the middle of the multi char line delimiter: - The previous concurrent will read the complete row1 and read a little more to read the line delimiter. - The latter concurrency will start reading from half of the multi char line delimiter, and row2 is the first line of this concurrency, but the first line in the middle range is always discarded, so row2 will be lost. ## Proposed changes Issue Number: close #xxx <!--Describe your changes.-->
Proposed changes
If the agg function is sum, the type of mv column will be bigint.
The only exception is that if the base column is largeint, the type of mv column will be largeint.
If the agg function is min or max, the type of mv column will be same as the type of base column.
For example, the type of mv column is smallint when the agg function is min.
Change-Id: I1b541fd03342ceba093c4aabd8a29793c52781dc
Types of changes
What types of changes does your code introduce to Doris?
Put an
xin the boxes that applyChecklist
Put an
xin 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.