Review Board 1.7.22


enhance TRUNCATE syntex to drop data of external table

Review Request #10600 - Created April 18, 2013 and updated

fangkun cao
hive-trunk
HIVE-4367
Reviewers
hive
hive
https://issues.apache.org/jira/browse/HIVE-4367
create external table external1 (a int, b int) partitioned by (ds string);
load data local inpath '../data/files/kv1.txt' into table external1 partition (ds='2008-04-08');
load data local inpath '../data/files/kv1.txt' into table external1 partition (ds='2008-04-09');

-- trucate EXTERNAL table
TRUNCATE TABLE external1 PARTITION (ds='2008-04-08') FORCE;
select * from external1  where ds='2008-04-08'; 
select * from external1  where ds='2008-04-09';

TRUNCATE TABLE external1 FORCE;
select * from external1;
http://svn.apache.org/repos/asf/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
Revision 1469218 New Change
[20] 648 lines
[+20] [+] public class HiveConf extends Configuration {
649

    
   
649

   
650
    HIVECONFVALIDATION("hive.conf.validation", true),
650
    HIVECONFVALIDATION("hive.conf.validation", true),
651

    
   
651

   
652
    SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook", ""),
652
    SEMANTIC_ANALYZER_HOOK("hive.semantic.analyzer.hook", ""),
653

    
   
653

   

    
   
654
    HIVE_TRUNCATE_SKIPTRASH("hive.truncate.skiptrash", false),

    
   
655

   
654
    HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false),
656
    HIVE_AUTHORIZATION_ENABLED("hive.security.authorization.enabled", false),
655
    HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager",
657
    HIVE_AUTHORIZATION_MANAGER("hive.security.authorization.manager",
656
        "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider"),
658
        "org.apache.hadoop.hive.ql.security.authorization.DefaultHiveAuthorizationProvider"),
657
    HIVE_AUTHENTICATOR_MANAGER("hive.security.authenticator.manager",
659
    HIVE_AUTHENTICATOR_MANAGER("hive.security.authenticator.manager",
658
        "org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator"),
660
        "org.apache.hadoop.hive.ql.security.HadoopDefaultAuthenticator"),
[+20] [20] 581 lines
http://svn.apache.org/repos/asf/hive/trunk/conf/hive-default.xml.template
Revision 1469218 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
Revision 1469218 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
Revision 1469218 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
Revision 1469218 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
Revision 1469218 New Change
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientpositive/truncate_table_force.q
New File
 
http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/truncate_table_force.q.out
New File
 
  1. http://svn.apache.org/repos/asf/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java: Loading...
  2. http://svn.apache.org/repos/asf/hive/trunk/conf/hive-default.xml.template: Loading...
  3. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java: Loading...
  4. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java: Loading...
  5. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g: Loading...
  6. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g: Loading...
  7. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientpositive/truncate_table_force.q: Loading...
  8. http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/truncate_table_force.q.out: Loading...