Skip to content

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

morrySnow
morrySnow previously approved these changes Nov 7, 2024
@github-actions
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
@github-actions
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

@morrySnow
Copy link
Contributor

run p0

@morrySnow morrySnow force-pushed the add_query_with_tablet_etc_test branch from 50b5c49 to 3d3311d Compare November 22, 2024 09:00
@morrySnow
Copy link
Contributor

run buildall

@seawinde seawinde force-pushed the add_query_with_tablet_etc_test branch 2 times, most recently from 5e8002c to 27daea3 Compare November 28, 2024 02:21
@seawinde
Copy link
Contributor Author

run buildall

@seawinde seawinde force-pushed the add_query_with_tablet_etc_test branch from 27daea3 to 793bbe7 Compare November 28, 2024 06:35
@seawinde
Copy link
Contributor Author

run buildall

@morrySnow morrySnow merged commit 6f87e35 into apache:master Dec 2, 2024
16 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 2, 2024
…LESAMPLE or tablet and so on (#43030)

Related PR: #28064

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.
morrySnow pushed a commit that referenced this pull request Dec 6, 2024
… such as TABLESAMPLE or tablet and so on #43030 (#44873)

Cherry-picked from #43030

Co-authored-by: seawinde <wusi@selectdb.com>
seawinde added a commit to seawinde/doris that referenced this pull request Dec 6, 2024
…LESAMPLE or tablet and so on (apache#43030)

Related PR: apache#28064

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.
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. dev/2.1.8-merged dev/3.0.4-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants