Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
ghx-label-6
Description
For infrequently modified datasets, building suitable materialized views and querying on materialized views directly can significantly reduce query response time.
Currently IMPALA only treats materialized view built by hive as a normal table and does not support CREATE MATERIALIZED VIEW AS SELECTED and DROP MATERIALIZED VIEW syntax on IMPALA.
CREATE TABLE AS SELECT can save the intermediate results of the query, but it is very inconvenient to use and maintain, for example, the calculation logic is not visible to the user.
So I want to implement support create/drop materialized view syntax on impala.
CREATE MATERIALIZED VIEW syntax like this
CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db_name.]table_name [PARTITIONED BY (col_name[, ...])] [SORT BY ([column [, column ...]])] [COMMENT 'table_comment'] [ROW FORMAT row_format] [WITH SERDEPROPERTIES ('key1'='value1', 'key2'='value2', ...)] [STORED AS cmvas_file_format] [LOCATION 'hdfs_path'] [CACHED IN 'pool_name' [WITH REPLICATION = integer] | UNCACHED] [TBLPROPERTIES ('key1'='value1', 'key2'='value2', ...)] AS select_statement cmvas_file_format: PARQUET | TEXTFILE
DROP MATERIALIZED VIEW syntax like this
DROP MATERIALIZED VIEW [IF EXISTS] [db_name.]table_name