Skip to content
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

[fix](mtmv) Fix data wrong when query with table operator such as TABLESAMPLE or tablet and so on #43030

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

seawinde
Copy link
Contributor

What problem does this PR solve?

Materialized view is as following:

        CREATE MATERIALIZED VIEW mv1
        BUILD IMMEDIATE REFRESH AUTO ON MANUAL  
        DISTRIBUTED BY RANDOM BUCKETS 2  
        PROPERTIES ('replication_num' = '1')  
        AS 
       select * from orders

If run query as following, should rewrite fail by materialized view above to make sure data correctness

select * from orders TABLET(110);
select * from orders index query_index_test;
select * from orders TABLESAMPLE(20 percent);
select * from orders_partition PARTITION (day_2);

At before, this would rewrite by materialized view succesfully and the result data is wrong, This pr fix this.

Issue Number: close #xxx

Related PR: #28064

Problem Summary:

Check List (For Committer)

  • 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 colde files have been changed.
      • Other reason
  • Behavior changed:

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

    • No.
    • Yes.
  • Release note

    None

Check List (For Reviewer who merge this PR)

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

@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@seawinde
Copy link
Contributor Author

run buildall

@seawinde seawinde changed the title [fix](mtmv) Fix data wrong when query with table operator such as TABLESAMPLE or tablet and so ono [fix](mtmv) Fix data wrong when query with table operator such as TABLESAMPLE or tablet and so on Oct 31, 2024
@seawinde
Copy link
Contributor Author

seawinde commented Nov 1, 2024

run buildall

@seawinde seawinde force-pushed the add_query_with_tablet_etc_test branch from eda8d89 to 1767731 Compare November 4, 2024 09:47
@seawinde
Copy link
Contributor Author

seawinde commented Nov 4, 2024

run buildall

1 similar comment
@seawinde
Copy link
Contributor Author

seawinde commented Nov 5, 2024

run buildall

Copy link
Contributor

github-actions bot commented Nov 7, 2024

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

PR approved by anyone and no changes requested.

Copy link
Contributor

@zfr9527 zfr9527 left a comment

Choose a reason for hiding this comment

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

LGTM

@morrySnow
Copy link
Contributor

run cloud_p0

@seawinde seawinde force-pushed the add_query_with_tablet_etc_test branch from 12107f2 to db7ec16 Compare November 7, 2024 09:35
@seawinde
Copy link
Contributor Author

seawinde commented Nov 7, 2024

run buildall

@morrySnow morrySnow force-pushed the add_query_with_tablet_etc_test branch from db7ec16 to 50b5c49 Compare November 19, 2024 13:07
@morrySnow
Copy link
Contributor

run buildall

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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants