[ 
https://issues.apache.org/jira/browse/HIVE-18842?focusedWorklogId=271999&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-271999
 ]

ASF GitHub Bot logged work on HIVE-18842:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Jul/19 05:24
            Start Date: 04/Jul/19 05:24
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #696: HIVE-18842
URL: https://github.com/apache/hive/pull/696#discussion_r300232535
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
 ##########
 @@ -7297,8 +7435,19 @@ protected Operator genFileSinkPlan(String dest, QB qb, 
Operator input)
       // Add NOT NULL constraint check
       input = genConstraintsPlan(dest, qb, input);
 
-      // Add sorting/bucketing if needed
-      input = genBucketingSortingDest(dest, input, qb, tableDescriptor, 
destinationTable, rsCtx);
+      if (destinationTable.isMaterializedView() &&
+          mvRebuildMode == 
MaterializationRebuildMode.INSERT_OVERWRITE_REBUILD) {
+        // Data organization (DISTRIBUTED, SORTED, CLUSTERED) for materialized 
view
+        // TODO: We only do this for a full rebuild
 
 Review comment:
   I think a `WARN` may be too aggressive, since there is nothing wrong in the 
system, it is just a feature that is missing (incremental maintenance of the 
view does not organize the new data according to the spec). I will add a DEBUG 
message though.
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 271999)
    Time Spent: 1h 20m  (was: 1h 10m)

> CLUSTERED ON/DISTRIBUTED ON+SORTED ON support for materialized views
> --------------------------------------------------------------------
>
>                 Key: HIVE-18842
>                 URL: https://issues.apache.org/jira/browse/HIVE-18842
>             Project: Hive
>          Issue Type: New Feature
>          Components: Materialized views
>    Affects Versions: 3.0.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: pull-request-available, todoc4.0
>         Attachments: HIVE-18842.01.patch, HIVE-18842.01.patch, 
> HIVE-18842.02.patch, HIVE-18842.03.patch, HIVE-18842.patch
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> We should support defining a {{CLUSTERED ON/DISTRIBUTED ON+SORTED ON}} 
> 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]
>   [PARTITIONED ON (col_name, ...)]
>   [CLUSTERED ON (col_name, ...) | DISTRIBUTED ON (col_name, ...) SORTED ON 
> (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)

Reply via email to