deniskuzZ commented on code in PR #3802:
URL: https://github.com/apache/hive/pull/3802#discussion_r1035630068


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergSerDe.java:
##########
@@ -120,16 +114,11 @@ public void initialize(@Nullable Configuration 
configuration, Properties serDePr
         this.tableSchema = hiveSchemaOrThrow(e, autoConversion);
         // This is only for table creation, it is ok to have an empty 
partition column list
         this.partitionColumns = ImmutableList.of();
-        // create table for CTAS
-        if (e instanceof NoSuchTableException &&
-                
Boolean.parseBoolean(serDeProperties.getProperty(hive_metastoreConstants.TABLE_IS_CTAS)))
 {
-          if (!Catalogs.hiveCatalog(configuration, serDeProperties)) {
-            throw new SerDeException(CTAS_EXCEPTION_MSG);
-          }
 
-          if (!serDeProperties.containsKey(Constants.EXPLAIN_CTAS_LOCATION)) {
-            createTableForCTAS(configuration, serDeProperties);
-          }
+        if (e instanceof NoSuchTableException &&
+                
Boolean.parseBoolean(serDeProperties.getProperty(hive_metastoreConstants.TABLE_IS_CTAS))
 &&

Review Comment:
   use the helper method, suggested above



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