seawinde opened a new pull request, #35562:
URL: https://github.com/apache/doris/pull/35562
## Proposed changes
Materialized view partition track supports date_trunc and optimize the fail
reason.
it supports create partition mv as following:
this mv will be partition updated by day
```
CREATE MATERIALIZED VIEW mv_6
BUILD IMMEDIATE REFRESH AUTO ON MANUAL
partition by(date_trunc(date_alias, 'day'))
DISTRIBUTED BY RANDOM BUCKETS 2
PROPERTIES ('replication_num' = '1')
AS
SELECT date_trunc(t1.L_SHIPDATE, 'hour') as date_alias, t2.O_ORDERDATE,
t1.L_QUANTITY, t2.O_ORDERSTATUS,
count(distinct case when t1.L_SUPPKEY > 0 then t2.O_ORDERSTATUS else null
end) as cnt_1
from
(select * from
lineitem
where L_SHIPDATE in ('2017-01-30')) t1
left join
(select * from
orders
where O_ORDERDATE in ('2017-01-30')) t2
on t1.L_ORDERKEY = t2.O_ORDERKEY
group by
t1.L_SHIPDATE,
t2.O_ORDERDATE,
t1.L_QUANTITY,
t2.O_ORDERSTATUS;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]