difin commented on code in PR #6449:
URL: https://github.com/apache/hive/pull/6449#discussion_r3314297412


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergMetaHook.java:
##########
@@ -183,6 +185,32 @@ public void 
rollbackCreateTable(org.apache.hadoop.hive.metastore.api.Table hmsTa
 
   @Override
   public void commitCreateTable(org.apache.hadoop.hive.metastore.api.Table 
hmsTable) {
+    if (BaseHiveIcebergMetaHook.isNativeIcebergLogicalView(hmsTable)) {
+      tableProperties = IcebergTableProperties.getTableProperties(hmsTable, 
conf);
+      if (Catalogs.hiveCatalog(conf, tableProperties)) {
+        boolean replace =
+            Boolean.parseBoolean(
+                SessionStateUtil.getProperty(conf, 
Constants.EXTERNAL_LOGICAL_VIEW_DDL_REPLACE).orElse("false"));
+        boolean ifNotExists =
+            Boolean.parseBoolean(
+                SessionStateUtil.getProperty(conf, 
Constants.EXTERNAL_LOGICAL_VIEW_CREATE_IF_NOT_EXISTS)
+                    .orElse("false"));

Review Comment:
   I put the second `orElse` it on a new line because of the 120 characters 
limit.
   
   Moved the 1st one on a new line too for the consistency.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to