You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/09/20 11:24:08 UTC

[GitHub] [hive] pgaref commented on a change in pull request #2640: HIVE-25520 - Enable concatenate for external table.

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



##########
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 {
+

Review comment:
       Unrelated change -- please remove

##########
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:
       We need a q.test demonstrating the expected behaviour here

##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -3254,6 +3254,8 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
 
     TRANSACTIONAL_CONCATENATE_NOBLOCK("hive.transactional.concatenate.noblock", false,
         "Will cause 'alter table T concatenate' to be non-blocking"),
+    ENABLE_CONCATENATE_FOR_EXTERNAL_TABLES("hive.concatenate.enable-external-tables", false,

Review comment:
       Avoid using hyphen for HiveConf options: something like hive.external.concatenate would do.
   Same for option: EXTERNAL_CONCATENATE is enough 

##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -3254,6 +3254,8 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal
 
     TRANSACTIONAL_CONCATENATE_NOBLOCK("hive.transactional.concatenate.noblock", false,
         "Will cause 'alter table T concatenate' to be non-blocking"),
+    ENABLE_CONCATENATE_FOR_EXTERNAL_TABLES("hive.concatenate.enable-external-tables", false,
+        "Enable concatenate for external tables"),

Review comment:
       What is the expected behaviour of this one? Add some description




-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org