You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ay...@apache.org on 2022/09/20 17:31:03 UTC

[hive] branch master updated: HIVE-26536: Enable 'hive.acid.truncate.usebase' by default (#3598). (Sourabh Badhya, reviewed by László Végh and Ayush Saxena)

This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f15a02573a HIVE-26536: Enable 'hive.acid.truncate.usebase' by default (#3598). (Sourabh Badhya, reviewed by László Végh and Ayush Saxena)
0f15a02573a is described below

commit 0f15a02573ab59ecebf07c8bb2d8c1c3d637a7a8
Author: Sourabh Badhya <42...@users.noreply.github.com>
AuthorDate: Tue Sep 20 23:00:54 2022 +0530

    HIVE-26536: Enable 'hive.acid.truncate.usebase' by default (#3598). (Sourabh Badhya, reviewed by László Végh and Ayush Saxena)
---
 common/src/java/org/apache/hadoop/hive/conf/HiveConf.java   | 2 +-
 ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java | 1 +
 ql/src/test/queries/clientpositive/acid_stats3.q            | 1 +
 ql/src/test/queries/clientpositive/check_constraint.q       | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 844ada74aaf..0f8d4f7e791 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -3068,7 +3068,7 @@ public class HiveConf extends Configuration {
         "Enables non-blocking DROP TABLE operation.\n" +
         "If enabled, every table directory would be suffixed with the corresponding table creation txnId."),
     
-    HIVE_ACID_TRUNCATE_USE_BASE("hive.acid.truncate.usebase", false,
+    HIVE_ACID_TRUNCATE_USE_BASE("hive.acid.truncate.usebase", true,
         "If enabled, truncate for transactional tables will not delete the data directories,\n" +
         "rather create a new base directory with no datafiles."),
     
diff --git a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
index d9f197b0919..5da6ea63787 100644
--- a/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java
@@ -149,6 +149,7 @@ public class TestTxnCommands2 extends TxnCommandsBaseForTests {
     //of these tests.
     HiveConf.setBoolVar(hiveConf, HiveConf.ConfVars.HIVE_VECTORIZATION_ENABLED, false);
     HiveConf.setBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTIMIZEMETADATAQUERIES, false);
+    HiveConf.setBoolVar(hiveConf, HiveConf.ConfVars.HIVE_ACID_TRUNCATE_USE_BASE, false);
   }
   
   @Override
diff --git a/ql/src/test/queries/clientpositive/acid_stats3.q b/ql/src/test/queries/clientpositive/acid_stats3.q
index 7a7bf19f452..f4c332b5934 100644
--- a/ql/src/test/queries/clientpositive/acid_stats3.q
+++ b/ql/src/test/queries/clientpositive/acid_stats3.q
@@ -15,6 +15,7 @@ set hive.fetch.task.conversion=none;
 set hive.support.concurrency=true;
 set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
 set hive.query.results.cache.enabled=false;
+set hive.acid.truncate.usebase=false;
 
 -- test truncate
 
diff --git a/ql/src/test/queries/clientpositive/check_constraint.q b/ql/src/test/queries/clientpositive/check_constraint.q
index 0cdcb64341b..6c769b928bd 100644
--- a/ql/src/test/queries/clientpositive/check_constraint.q
+++ b/ql/src/test/queries/clientpositive/check_constraint.q
@@ -1,6 +1,7 @@
 set hive.stats.autogather=false;
 set hive.support.concurrency=true;
 set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
+set hive.acid.truncate.usebase=false;
 
 CREATE TABLE table1_n0(i int CHECK (-i > -10),
     j int CHECK (+j > 10),