[
https://issues.apache.org/jira/browse/HIVE-24519?focusedWorklogId=531335&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-531335
]
ASF GitHub Bot logged work on HIVE-24519:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jan/21 16:48
Start Date: 05/Jan/21 16:48
Worklog Time Spent: 10m
Work Description: jcamachor commented on a change in pull request #1772:
URL: https://github.com/apache/hive/pull/1772#discussion_r552045065
##########
File path:
ql/src/test/results/clientnegative/materialized_view_authorization_rebuild_no_grant.q.out
##########
@@ -33,4 +33,4 @@ POSTHOOK: type: CREATE_MATERIALIZED_VIEW
POSTHOOK: Input: default@amvrng_table
POSTHOOK: Output: database:default
POSTHOOK: Output: default@amvrng_mat_view
-FAILED: HiveAccessControlException Permission denied: Principal [name=user1,
type=USER] does not have following privileges for operation QUERY [[INSERT,
DELETE] on Object [type=TABLE_OR_VIEW, name=default.amvrng_mat_view,
action=INSERT_OVERWRITE]]
+FAILED: HiveAccessControlException Permission denied: Principal [name=user1,
type=USER] does not have following privileges for operation
ALTER_MATERIALIZED_VIEW_REBUILD [[OBJECT OWNERSHIP] on Object
[type=TABLE_OR_VIEW, name=default.amvrng_mat_view, action=INSERT_OVERWRITE]]
Review comment:
It seems we need object ownership for rebuild now (this is probably
because of the changes in Operation2Privilege.java). We should mimic
HiveOperationType.QUERY privileges instead of other ALTER statements (we
probably need SELECT, INSERT, and DELETE on the MV).
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -28,11 +28,14 @@
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import static
org.apache.hadoop.hive.conf.Constants.MATERIALIZED_VIEW_REWRITING_TIME_WINDOW;
import static
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE;
import static
org.apache.hadoop.hive.metastore.utils.MetaStoreUtils.getDefaultCatalog;
import static org.apache.hadoop.hive.ql.io.AcidUtils.getFullTableName;
import static
org.apache.hadoop.hive.ql.metadata.HiveRelOptMaterialization.RewriteAlgorithm.CALCITE;
import static
org.apache.hadoop.hive.ql.metadata.HiveRelOptMaterialization.RewriteAlgorithm.ALL;
+import static
org.apache.hadoop.hive.ql.metadata.HiveRelOptMaterialization.RewriteAlgorithm.CALCITE;
Review comment:
nit. repeated import
##########
File path:
ql/src/test/results/clientpositive/llap/insert1_overwrite_partitions.q.out
##########
@@ -198,9 +198,7 @@ PREHOOK: type: QUERY
POSTHOOK: query: EXPLAIN INSERT OVERWRITE TABLE destinTable PARTITION
(ds='2011-11-11', hr='11') if not exists
SELECT one,two FROM sourceTable WHERE ds='2011-11-11' AND hr='12' order by one
desc, two desc limit 5
POSTHOOK: type: QUERY
-STAGE DEPENDENCIES:
Review comment:
I'm going to back down from this change. It seems there were occasions
where this was empty. Let's just keep it as it was for backwards compatibility.
If we want to remove them, we can do it in a separate JIRA. Sorry about the
confusion.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 531335)
Time Spent: 1h 50m (was: 1h 40m)
> Optimize MV: Materialized views should not rebuild when tables are not
> modified
> -------------------------------------------------------------------------------
>
> Key: HIVE-24519
> URL: https://issues.apache.org/jira/browse/HIVE-24519
> Project: Hive
> Issue Type: Sub-task
> Components: Materialized views
> Reporter: Rajesh Balamohan
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> e.g
> {noformat}
> create materialized view c_c_address as
> select c_customer_sk from customer c, customer_address ca where
> c_current_addr_sk = ca.ca_address_id;
> ALTER MATERIALIZED VIEW c_c_address REBUILD; <-- This shouldn't trigger
> rebuild, when source tables are not modified
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)