You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2018/03/02 00:03:00 UTC

[jira] [Created] (HIVE-18842) CLUSTER BY/DISTRIBUTE BY/SORT BY support for materialized views

Jesus Camacho Rodriguez created HIVE-18842:
----------------------------------------------

             Summary: CLUSTER BY/DISTRIBUTE BY/SORT BY support for materialized views
                 Key: HIVE-18842
                 URL: https://issues.apache.org/jira/browse/HIVE-18842
             Project: Hive
          Issue Type: Improvement
          Components: Materialized views
    Affects Versions: 3.0.0
            Reporter: Jesus Camacho Rodriguez
            Assignee: Jesus Camacho Rodriguez


We should support defining a {{CLUSTER BY/DISTRIBUTE BY/SORT BY}} specification for materialized views. 

The syntax should be extended as follows:

{code:sql}
CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db_name.]materialized_view_name
  [COMMENT materialized_view_comment]
  [CLUSTER BY (col_name, ...) | ( [DISTRIBUTE BY (col_name, ...)] [SORT BY (col_name, ...)] ) ] -- NEW!
  [
   [ROW FORMAT row_format] 
   [STORED AS file_format]
     | STORED BY 'storage.handler.class.name' [WITH SERDEPROPERTIES (...)]
  ]
  [LOCATION hdfs_path]
  [TBLPROPERTIES (property_name=property_value, ...)]
  AS select_statement;
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)