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

[improvement](mtmv) Materialized view partition track supports date_trunc and optimize the fail reason #35562

Merged
merged 14 commits into from
Jun 5, 2024
10 changes: 5 additions & 5 deletions regression-test/suites/mtmv_p0/test_rollup_partition_mtmv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,13 @@ suite("test_rollup_partition_mtmv") {
sql """
CREATE MATERIALIZED VIEW ${mvName}
BUILD IMMEDIATE REFRESH AUTO ON MANUAL
partition by (date_trunc(month_alias, 'month'))
partition by (date_trunc(day_alias, 'month'))
DISTRIBUTED BY RANDOM BUCKETS 2
PROPERTIES (
'replication_num' = '1'
)
AS
SELECT date_trunc(`k2`,'day') as month_alias FROM ${tableName};
SELECT date_trunc(`k2`,'day') as day_alias FROM ${tableName};
"""
def date_range_month_partitions_level = sql """show partitions from ${mvName}"""
logger.info("showPartitionsResult: " + date_range_month_partitions_level.toString())
Expand Down Expand Up @@ -424,7 +424,7 @@ suite("test_rollup_partition_mtmv") {
'replication_num' = '1'
)
AS
SELECT date_trunc(`k2`,'day') as month_alias FROM ${tableName};
SELECT date_trunc(`k2`,'day') as day_alias FROM ${tableName};
"""
Assert.fail();
} catch (Exception e) {
Expand Down Expand Up @@ -602,13 +602,13 @@ suite("test_rollup_partition_mtmv") {
sql """
CREATE MATERIALIZED VIEW ${mvName}
BUILD IMMEDIATE REFRESH AUTO ON MANUAL
partition by (date_trunc(month_alias, 'hour'))
partition by (date_trunc(miniute_alias, 'hour'))
DISTRIBUTED BY RANDOM BUCKETS 2
PROPERTIES (
'replication_num' = '1'
)
AS
SELECT date_trunc(`k2`,'miniute') as month_alias, * FROM ${tableName};
SELECT date_trunc(`k2`,'miniute') as miniute_alias, * FROM ${tableName};
Copy link
Contributor

Choose a reason for hiding this comment

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

miniute==>minute?

"""
Assert.fail();
} catch (Exception e) {
Expand Down
Loading