You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2023/01/19 21:14:57 UTC

[GitHub] [hive] zabetak commented on a diff in pull request #3967: HIVE-26967: Deadlock when enabling/disabling Materialized view stored by Iceberg

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?



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org