-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](mtmv) Fix partition track column fail when 'select *' used in related partition side #43531
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
Merged
morrySnow
merged 1 commit into
apache:master
from
seawinde:fix_partition_column_track_fail
Nov 14, 2024
Merged
[fix](mtmv) Fix partition track column fail when 'select *' used in related partition side #43531
morrySnow
merged 1 commit into
apache:master
from
seawinde:fix_partition_column_track_fail
Nov 14, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…elated partition side
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
zddr
approved these changes
Nov 14, 2024
Contributor
|
PR approved by anyone and no changes requested. |
morrySnow
approved these changes
Nov 14, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
github-actions bot
pushed a commit
that referenced
this pull request
Nov 14, 2024
…elated partition side (#43531) ### What problem does this PR solve? Related PR: #34781 Problem Summary: Table def as following, if create partition mv as following will throw exception ERROR 1105 (HY000): errCode = 2, detailMessage = Unable to find a suitable base table for partitioning, the fail reason is can't not find valid partition track column CREATE MATERIALIZED VIEW mv_10086 BUILD IMMEDIATE REFRESH AUTO ON MANUAL partition by(l_orderkey) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select l1.*, O_CUSTKEY from lineitem_list_partition l1 left outer join orders_list_partition on l1.l_shipdate = o_orderdate; CREATE TABLE `orders_list_partition` ( `o_orderkey` BIGINT not NULL, `o_custkey` INT NULL, `o_orderstatus` VARCHAR(1) NULL, `o_totalprice` DECIMAL(15, 2) NULL, `o_orderpriority` VARCHAR(15) NULL, `o_clerk` VARCHAR(15) NULL, `o_shippriority` INT NULL, `o_comment` VARCHAR(79) NULL, `o_orderdate` DATE NULL ) ENGINE=OLAP DUPLICATE KEY(`o_orderkey`, `o_custkey`) COMMENT 'OLAP' PARTITION BY list(o_orderkey) ( PARTITION p1 VALUES in ('1'), PARTITION p2 VALUES in ('2'), PARTITION p3 VALUES in ('3'), PARTITION p4 VALUES in ('4') ) DISTRIBUTED BY HASH(`o_orderkey`) BUCKETS 3 PROPERTIES ( "replication_num" = "1" ); CREATE TABLE `lineitem_list_partition` ( `l_orderkey` BIGINT not NULL, `l_linenumber` INT NULL, `l_partkey` INT NULL, `l_suppkey` INT NULL, `l_quantity` DECIMAL(15, 2) NULL, `l_extendedprice` DECIMAL(15, 2) NULL, `l_discount` DECIMAL(15, 2) NULL, `l_tax` DECIMAL(15, 2) NULL, `l_returnflag` VARCHAR(1) NULL, `l_linestatus` VARCHAR(1) NULL, `l_commitdate` DATE NULL, `l_receiptdate` DATE NULL, `l_shipinstruct` VARCHAR(25) NULL, `l_shipmode` VARCHAR(10) NULL, `l_comment` VARCHAR(44) NULL, `l_shipdate` DATE NULL ) ENGINE=OLAP DUPLICATE KEY(l_orderkey, l_linenumber, l_partkey, l_suppkey ) COMMENT 'OLAP' PARTITION BY list(l_orderkey) ( PARTITION p1 VALUES in ('1'), PARTITION p2 VALUES in ('2'), PARTITION p3 VALUES in ('3') ) DISTRIBUTED BY HASH(`l_orderkey`) BUCKETS 3 PROPERTIES ("replication_num" = "1" ); ### Release note Fix partition track column fail when 'select *' used in related partition side
github-actions bot
pushed a commit
that referenced
this pull request
Nov 14, 2024
…elated partition side (#43531) ### What problem does this PR solve? Related PR: #34781 Problem Summary: Table def as following, if create partition mv as following will throw exception ERROR 1105 (HY000): errCode = 2, detailMessage = Unable to find a suitable base table for partitioning, the fail reason is can't not find valid partition track column CREATE MATERIALIZED VIEW mv_10086 BUILD IMMEDIATE REFRESH AUTO ON MANUAL partition by(l_orderkey) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select l1.*, O_CUSTKEY from lineitem_list_partition l1 left outer join orders_list_partition on l1.l_shipdate = o_orderdate; CREATE TABLE `orders_list_partition` ( `o_orderkey` BIGINT not NULL, `o_custkey` INT NULL, `o_orderstatus` VARCHAR(1) NULL, `o_totalprice` DECIMAL(15, 2) NULL, `o_orderpriority` VARCHAR(15) NULL, `o_clerk` VARCHAR(15) NULL, `o_shippriority` INT NULL, `o_comment` VARCHAR(79) NULL, `o_orderdate` DATE NULL ) ENGINE=OLAP DUPLICATE KEY(`o_orderkey`, `o_custkey`) COMMENT 'OLAP' PARTITION BY list(o_orderkey) ( PARTITION p1 VALUES in ('1'), PARTITION p2 VALUES in ('2'), PARTITION p3 VALUES in ('3'), PARTITION p4 VALUES in ('4') ) DISTRIBUTED BY HASH(`o_orderkey`) BUCKETS 3 PROPERTIES ( "replication_num" = "1" ); CREATE TABLE `lineitem_list_partition` ( `l_orderkey` BIGINT not NULL, `l_linenumber` INT NULL, `l_partkey` INT NULL, `l_suppkey` INT NULL, `l_quantity` DECIMAL(15, 2) NULL, `l_extendedprice` DECIMAL(15, 2) NULL, `l_discount` DECIMAL(15, 2) NULL, `l_tax` DECIMAL(15, 2) NULL, `l_returnflag` VARCHAR(1) NULL, `l_linestatus` VARCHAR(1) NULL, `l_commitdate` DATE NULL, `l_receiptdate` DATE NULL, `l_shipinstruct` VARCHAR(25) NULL, `l_shipmode` VARCHAR(10) NULL, `l_comment` VARCHAR(44) NULL, `l_shipdate` DATE NULL ) ENGINE=OLAP DUPLICATE KEY(l_orderkey, l_linenumber, l_partkey, l_suppkey ) COMMENT 'OLAP' PARTITION BY list(l_orderkey) ( PARTITION p1 VALUES in ('1'), PARTITION p2 VALUES in ('2'), PARTITION p3 VALUES in ('3') ) DISTRIBUTED BY HASH(`l_orderkey`) BUCKETS 3 PROPERTIES ("replication_num" = "1" ); ### Release note Fix partition track column fail when 'select *' used in related partition side
hubgeter
pushed a commit
to hubgeter/doris
that referenced
this pull request
Mar 12, 2025
…h wrongly when has filter (apache#3649) pr: apache#43531 commitId: b2e42f2 pr: apache#43539 commitId: eb6c00c b0cecf4 --------- Co-authored-by: seawinde <wusi@selectdb.com>
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.3-merged
reviewed
usercase
Important user case type label
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #34781
Problem Summary:
Table def as following, if create partition mv as following will throw exception
ERROR 1105 (HY000): errCode = 2, detailMessage = Unable to find a suitable base table for partitioning, the fail reason is can't not find valid partition track column, becauseCREATE MATERIALIZED VIEW mv_10086 BUILD IMMEDIATE REFRESH AUTO ON MANUAL partition by(l_orderkey) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select l1.*, O_CUSTKEY from lineitem_list_partition l1 left outer join orders_list_partition on l1.l_shipdate = o_orderdate;Release note
Fix partition track column fail when 'select *' used in related partition side
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)