pgaref commented on a change in pull request #2640:
URL: https://github.com/apache/hive/pull/2640#discussion_r723552123



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/concatenate/AlterTableConcatenateAnalyzer.java
##########
@@ -73,13 +73,19 @@ protected void analyzeCommand(TableName tableName, 
Map<String, String> partition
     if (AcidUtils.isTransactionalTable(table)) {
       compactAcidTable(tableName, partitionSpec);
     } else {
+
       // non-native and non-managed tables are not supported as MoveTask 
requires filenames to be in specific format,
       // violating which can cause data loss
       if (table.isNonNative()) {
         throw new 
SemanticException(ErrorMsg.CONCATENATE_UNSUPPORTED_TABLE_NON_NATIVE.getMsg());
       }
+
       if (table.getTableType() != TableType.MANAGED_TABLE) {
-        throw new 
SemanticException(ErrorMsg.CONCATENATE_UNSUPPORTED_TABLE_NOT_MANAGED.getMsg());
+        // Enable concatenate for external tables if config is set.
+        if (!conf.getBoolVar(ConfVars.ENABLE_CONCATENATE_FOR_EXTERNAL_TABLES)

Review comment:
       Thanks




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