incubator-doris Support more materialized view syntax

7fhtutme  于 2022-04-22  发布在  Java
关注(0)|答案(1)|浏览(183)

Consider that future materialized views may contain multiple tables (currently limited to a single table).
The syntax associated with materialized views should not inherit from the original ROLLUP syntax or be table level. It should be at the database level.

CREATE
Add a judgment of uniqueness when create a materialized view

DROP
DROP MATERIALIZED VIEW [ IF EXISTS ] [db_name].< mv_name >
To compatibility with the old rollup logic, the syntax "DROP MATERIALIZED VIEW [ IF EXISTS ] [db_name].< mv_name > FROM [db].[table]" has been added

SHOW
SHOW MATERIALIZED VIEW [IN|FROM db_name]
SHOW ALTER MATERIALIZED VIEW FROM db_name

CANCEL
CANCEL ALTER MATERIALIZED VIEW FROM db_name.mv_name

yv5phkfx

yv5phkfx1#

  • Alter

Alter materialized view on database.

The second question is that how to compatible with existing materialized view and rollup logic.
For example, user create a rollup job by create materialized view stmt with only mv_name.
If user wants to drop materialized view by mv_name, the stmt will throw error.

相关问题