Skip to content

Conversation

@seawinde
Copy link
Contributor

What problem does this PR solve?

pr: #52960
commitId: 0a5cd95

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…ys nullable (apache#52960)

### What problem does this PR solve?

Related PR: apache#36318

Problem Summary:

materaialized view def is as fllowing:

create materialized view as
select k1, k3, sum(k2), count(k4) from ${tblName} group by k1, k3;

`sum(k2) ` nullable is true
if query is as following, would rewritten fail with err info 'query
aggregate function roll up fail', the pr fix this

select sum(distinct k1) from agg_use_key_direct
@seawinde seawinde requested a review from yiguolei as a code owner August 14, 2025 11:41
@Thearas
Copy link
Contributor

Thearas commented Aug 14, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@seawinde
Copy link
Contributor Author

run buildall

@seawinde seawinde changed the title Fix count distinct mv rewrite fail 21 [fix](mtmv) Fix aggregate function roll up fail when function is always nullable #52960 Aug 15, 2025
@morrySnow morrySnow closed this Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants