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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -831,16 +839,19 @@ static void overlayTableProperties(Configuration 
configuration, TableDesc tableD
       map.put(InputFormatConfig.SERIALIZED_TABLE_PREFIX + 
tableDesc.getTableName(),
           SerializationUtil.serializeToBase64(serializableTable));
     } catch (NoSuchTableException ex) {
-      if 
(!(StringUtils.isNotBlank(props.getProperty(hive_metastoreConstants.TABLE_IS_CTAS))
 &&
-              
StringUtils.isNotBlank(props.getProperty(Constants.EXPLAIN_CTAS_LOCATION)))) {
+      if (!HiveTableUtil.isCtas(props)) {
         throw ex;
       }
 
-      location = map.get(hive_metastoreConstants.META_TABLE_LOCATION);
-      if (StringUtils.isBlank(location)) {
-        location = props.getProperty(Constants.EXPLAIN_CTAS_LOCATION);
+      if (!Catalogs.hiveCatalog(configuration, props)) {
+        throw new 
UnsupportedOperationException(HiveIcebergSerDe.CTAS_EXCEPTION_MSG);
       }
 
+      location = map.get(hive_metastoreConstants.META_TABLE_LOCATION);
+
+      map.put(InputFormatConfig.SERIALIZED_TABLE_PREFIX + 
tableDesc.getTableName(),
+              SerializationUtil.serializeToBase64(null));

Review Comment:
   Why need `null `here? We already have put a serialized table into the `map 
`before this line in the same method:
   
https://github.com/apache/hive/blob/88f4336db3263208ba728eb5679a21a5819ca0df/iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java#L1222-L1223



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