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

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

                Author: ASF GitHub Bot
            Created on: 19/Jan/23 21:14
            Start Date: 19/Jan/23 21:14
    Worklog Time Spent: 10m 
      Work Description: zabetak commented on code in PR #3967:
URL: https://github.com/apache/hive/pull/3967#discussion_r1081869696


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rewrite/AlterMaterializedViewRewriteAnalyzer.java:
##########
@@ -87,8 +88,15 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
     }
 
     inputs.add(new ReadEntity(materializedViewTable));
-    outputs.add(new WriteEntity(materializedViewTable, 
AcidUtils.isLocklessReadsEnabled(materializedViewTable, conf) ?
-      WriteEntity.WriteType.DDL_EXCL_WRITE : 
WriteEntity.WriteType.DDL_EXCLUSIVE));
+    WriteEntity.WriteType type;
+    if (MetaStoreUtils.isNonNativeTable(materializedViewTable.getTTable())
+            && 
materializedViewTable.getStorageHandler().areSnapshotsSupported()) {
+      type = WriteEntity.WriteType.DDL_SHARED;
+    } else {
+       type = AcidUtils.isLocklessReadsEnabled(materializedViewTable, conf) ?

Review Comment:
   bad indentation?





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

    Worklog Id:     (was: 840459)
    Time Spent: 0.5h  (was: 20m)

> Deadlock when enabling/disabling Materialized view stored by Iceberg
> --------------------------------------------------------------------
>
>                 Key: HIVE-26967
>                 URL: https://issues.apache.org/jira/browse/HIVE-26967
>             Project: Hive
>          Issue Type: Bug
>          Components: Iceberg integration
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {code}
> set hive.support.concurrency=true;
> set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
> create table all100k(
>         t int,
>         si int,
>         i int,
>         b bigint,
>         f float,
>         d double,
>         s string,
>         dc decimal(38,18),
>         bo boolean,
>         v string,
>         c string,
>         ts timestamp,
>         dt date)
>     partitioned by spec (BUCKET(16, t))
>     stored by iceberg
>     stored as parquet;
> create materialized view mv_rewrite stored by iceberg as select t, si from 
> all100k where t>115;
> explain select si,t from all100k where t>116 and t<120;
> alter materialized view mv_rewrite disable rewrite;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to