Skip to content

pick some pr from to branch21 #38115 #38008 #37929 - #38940

Merged
yiguolei merged 5 commits into
apache:branch-2.1from
seawinde:rebase_some_pr_from_master_to_branch21
Aug 7, 2024
Merged

pick some pr from to branch21 #38115 #38008 #37929#38940
yiguolei merged 5 commits into
apache:branch-2.1from
seawinde:rebase_some_pr_from_master_to_branch21

Conversation

@seawinde

Copy link
Copy Markdown
Member

Proposed changes

pr: #38115
commitId: 2b29288

pr: #38008
commitId: c6b924d

pr: #37929
commitId: d44fcdc

seawindeand others added 4 commits August 6, 2024 14:06
…sert and insert overwrite dml (apache#38115)
Support querying rewrite by materialized view when DML such as insert
and insert overwrite , into outfile etc.
this is default enable, you can disable it by `set
enable_dml_materialized_view_rewrite = false`
and the `enable_materialized_view_rewrite` is only control DQL.
It would not rewrite by materialized view when query sql use external
table.
If you want rewrite by materialized view when use external table in DML,
you should `set
enable_dml_materialized_view_rewrite_when_base_table_unawareness =
true;`
this is default false.
…iew (apache#38008)
Support to use cast when create sync materialized view
Such as sync mv def is as following:
you can use cast(FLOOR(MINUTE(`time`) / 15) as decimal(9, 0)) in mv
def which is not allowed before.
CREATE MATERIALIZED VIEW sync_mv
AS
SELECT decision,
code, app_name, event_id, event_type, date_trunc(time, 'minute'), DATE_FORMAT(
`time`, '%Y-%m-%d'
), cast(FLOOR(MINUTE(time) / 15) as decimal(9, 0)),
count(id) as cnt
from test group by code, app_name, event_id, event_type, date_trunc(time, 'minute'), decision, DATE_FORMAT(time, '%Y-%m-%d'), cast(FLOOR(MINUTE(`time`) / 15) as decimal(9, 0));
…#37929)
Support variants rewrite by materialized view
Such as the mv def is as following:
CREATE MATERIALIZED VIEW test1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL
DISTRIBUTED BY RANDOM BUCKETS 2
PROPERTIES ('replication_num' = '1') as
SELECT
id,
type,
actor,
payload,
payload['pull_request']
FROM github_events1;
the query following can rewrite successfully and the data is right
SELECT
id,
type,
floor(cast(actor['id'] as int) + 100.5),
actor['display_login'],
payload['pull_request']['id']
FROM github_events1;
@doris-robot

Copy link
Copy Markdown

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
Copy Markdown
MemberAuthor

run buildall

1 similar comment
@seawinde

Copy link
Copy Markdown
MemberAuthor

run buildall

@seawinde
seawindeforce-pushed the rebase_some_pr_from_master_to_branch21 branch from 27df2d7 to c536771CompareAugust 6, 2024 15:37
@seawinde

Copy link
Copy Markdown
MemberAuthor

run buildall

@yiguolei
yiguolei merged commit 2b1aa05 into apache:branch-2.1Aug 7, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@seawinde@doris-robot@yiguolei