marton-bod commented on a change in pull request #2243:
URL: https://github.com/apache/hive/pull/2243#discussion_r634328666



##########
File path: 
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergSerDe.java
##########
@@ -138,6 +148,17 @@ public void initialize(@Nullable Configuration 
configuration, Properties serDePr
     }
   }
 
+  private void createTableForCTAS(Configuration configuration, Properties 
serDeProperties) {
+    serDeProperties.setProperty(TableProperties.ENGINE_HIVE_ENABLED, "true");
+    serDeProperties.setProperty(InputFormatConfig.TABLE_SCHEMA, 
SchemaParser.toJson(tableSchema));
+    Catalogs.createTable(configuration, serDeProperties);
+    // set these in the global conf so that we can rollback the table in the 
lifecycle hook in case of failures

Review comment:
       I think so too. I'll table this topic for now though, and will create a 
follow-up patch to put the job commit info (as discussed in the write commit 
PR) and this ctas info into this object.




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

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