Skip to content

Conversation

@EmmyMiao87
Copy link
Contributor

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

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 Doris's issues, and have described the bug/feature there in detail
  • Commit messages in my PR start with the related issues ID, like "Add pull request template to doris project #4071 Add pull request template to doris project"
  • 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

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
@EmmyMiao87 EmmyMiao87 added the area/materialized-view Issues or PRs related to materialized view label Jul 28, 2020
@kangkaisen
Copy link
Contributor

Please add a UT to cover this PR.

Change-Id: Id451b0f7b334e265e1b495ee0aa47a686fffc1ee
Change-Id: Iffb7d3d7cbac6e98f4f358dd7c98a7d0dea2d4fc
@EmmyMiao87
Copy link
Contributor Author

Please add a UT to cover this PR.

Added

@kangkaisen
Copy link
Contributor

If the agg function is sum, the type of mv column will be bigint.

@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
@EmmyMiao87
Copy link
Contributor Author

If the agg function is sum, the type of mv column will be bigint.

@EmmyMiao87 Hi. for sum(double), sum(decimal), the type of mv column will also be bigint?

Fixed

|| baseColumnType == PrimitiveType.INT) {
type = Type.BIGINT;
} else {
type = Type.fromPrimitiveType(baseColumnRef.getType().getPrimitiveType());
Copy link
Contributor

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
kangkaisen previously approved these changes Jul 29, 2020
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

@kangkaisen kangkaisen added the approved Indicates a PR has been approved by one committer. label Jul 29, 2020
Change-Id: I0cf85a09417bfd7be2ec48c42edaf67a8bcef686
@morningman morningman added the branch-0.13 PR which need to merge to branch 0.13 label Jul 30, 2020
Change-Id: I94e76f5b9f5258e81f807c7c5c8b36a451229aaf
@EmmyMiao87 EmmyMiao87 added branch-0.13 PR which need to merge to branch 0.13 and removed branch-0.13 PR which need to merge to branch 0.13 labels Jul 30, 2020
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@morningman morningman merged commit 25f3420 into apache:master Aug 1, 2020
@EmmyMiao87 EmmyMiao87 mentioned this pull request Aug 6, 2020
morningman pushed a commit that referenced this pull request Aug 6, 2020
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
Hastyshell pushed a commit to Hastyshell/doris that referenced this pull request Jul 30, 2025
…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.-->
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/materialized-view Issues or PRs related to materialized view branch-0.13 PR which need to merge to branch 0.13

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants