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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/BaseHiveIcebergMetaHook.java:
##########
@@ -204,6 +222,18 @@ public void preCreateTable(CreateTableRequest request) {
     setSortOrder(hmsTable, schema, tableProperties);
   }
 
+  private void preCreateNativeIcebergLogicalView(CreateTableRequest request) {
+
+    org.apache.hadoop.hive.metastore.api.Table hmsTable = request.getTable();

Review Comment:
   
   The view's existence is checked here: 
https://github.com/apache/hive/blob/9f387afc25ef50ea83423c8ae7ac725a07259594/ql/src/java/org/apache/hadoop/hive/ql/ddl/view/create/CreateViewOperation.java#L49-L50
   
   * Both `CreateViewOperation.execute` and the methods in 
`BaseHiveIcebergMetaHook` run on the client side. If we want to add extra 
checks, I think they should be added on the server side.
   * To add extra checks to the server side, we will need to either extend the 
`CreateTableRequest` API with fields like `replace` and `ifNotExists`, or 
create a brand new API for creating views. This introduces an API change either 
way, so all types of views should be addressed. Since this isn't currently 
supported for native Hive views, we can handle it in a follow-up patch.
   * Performance for a CREATE VIEW statement is not a high priority because it 
is not a frequently executed operation.
   



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