This is an automated email from the ASF dual-hosted git repository.
lpinter pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 9b00e04a10d HIVE-26483: Use DDL_NO_LOCK when running iceberg CTAS
query (#3533) (Laszlo Pinter, reviewed by Denys Kuzmenko)
9b00e04a10d is described below
commit 9b00e04a10df83378c569b8096e68f1d6adb7f68
Author: László Pintér <[email protected]>
AuthorDate: Mon Aug 22 09:01:34 2022 +0200
HIVE-26483: Use DDL_NO_LOCK when running iceberg CTAS query (#3533) (Laszlo
Pinter, reviewed by Denys Kuzmenko)
---
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 4dbdc4c72d8..c3e7fb4a200 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -14046,7 +14046,9 @@ public class SemanticAnalyzer extends
BaseSemanticAnalyzer {
t.setSerdeParam(serdeMap.getKey(), serdeMap.getValue());
}
WriteType lockType = tblProps != null &&
Boolean.parseBoolean(tblProps.get(TABLE_IS_CTAS))
- && AcidUtils.isExclusiveCTASEnabled(conf) ?
+ && AcidUtils.isExclusiveCTASEnabled(conf)
+ // iceberg CTAS has it's own locking mechanism, therefore we should
exclude them
+ && (t.getStorageHandler() == null ||
!t.getStorageHandler().directInsertCTAS()) ?
WriteType.CTAS : WriteType.DDL_NO_LOCK;
outputs.add(new WriteEntity(t, lockType));