yoock opened a new pull request, #54033:
URL: https://github.com/apache/doris/pull/54033
### What problem does this PR solve?
Support incremental materialized views based on Paimon Snapshot
#### Applicable scenarios
- Pre-polymerization acceleration
- Pre-filtering acceleration
- Prefix index acceleration
#### limitation
- It only supports single-table SELECT statements, and clauses such as WHERE
and GROUP BY, but does not support JOIN, ORDER BY, HAVING, LIMIT, LATERAL VIEW,
or window functions
- Deleting and OVERWRITING source table data are not supported
- The aggregation functions only support sum, min, and max
#### Paimon Table
```
CREATE TABLE paimon_aggregate_table (
`date` bigint,
k1 bigint,
k2 bigint,
a1 double,
a2 double,
a3 string)
USING paimon
PARTITIONED BY (`date`)
TBLPROPERTIES (
'bucket' = '2',
'bucket-key' = 'k1,k2',
'fields.a1.aggregate-function' = 'sum',
'fields.a2.aggregate-function' = 'max',
'fields.a3.aggregate-function' = 'first_value',
'merge-engine' = 'aggregation',
'primary-key' = 'date,k1,k2');
```
#### incremental mv on Paimon
```
create materialized view wl_paimon_aggregate_table_mv
BUILD DEFERRED
REFRESH INCREMENTAL
ON MANUAL
PARTITION BY (date)
DISTRIBUTED BY RANDOM BUCKETS 2
PROPERTIES ('replication_num' = '1')
as
select date, k1, sum(a1) as a1
paimon_aggregate_table
group by date, k1;
```
--
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]