incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1309176 - in /incubator/hcatalog/trunk: CHANGES.txt src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
Date Tue, 03 Apr 2012 22:14:22 GMT
Author: gates
Date: Tue Apr  3 22:14:22 2012
New Revision: 1309176

URL: http://svn.apache.org/viewvc?rev=1309176&view=rev
Log:
HCATALOG-356 Compilation failure due to API change in HIVE-2908

Modified:
    incubator/hcatalog/trunk/CHANGES.txt
    incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java

Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1309176&r1=1309175&r2=1309176&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Tue Apr  3 22:14:22 2012
@@ -100,6 +100,8 @@ Release 0.4.0 - Unreleased
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-356 Compilation failure due to API change in HIVE-2908 (rohini via gates)
+
   HCAT-354 hive-hbase-handler jar not getting put in hcat package (gates)
 
   HCAT-348 HCatUtil::getHiveConf(Configuration) ignores passed-in conf while creating HiveConf
(gates)

Modified: incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java?rev=1309176&r1=1309175&r2=1309176&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
(original)
+++ incubator/hcatalog/trunk/src/java/org/apache/hcatalog/cli/SemanticAnalysis/HCatSemanticAnalyzer.java
Tue Apr  3 22:14:22 2012
@@ -19,7 +19,6 @@ package org.apache.hcatalog.cli.Semantic
 
 import java.io.Serializable;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -41,6 +40,7 @@ import org.apache.hadoop.hive.ql.plan.De
 import org.apache.hadoop.hive.ql.plan.DropDatabaseDesc;
 import org.apache.hadoop.hive.ql.plan.DropTableDesc;
 import org.apache.hadoop.hive.ql.plan.HiveOperation;
+import org.apache.hadoop.hive.ql.plan.PartitionSpec;
 import org.apache.hadoop.hive.ql.plan.ShowDatabasesDesc;
 import org.apache.hadoop.hive.ql.plan.ShowPartitionsDesc;
 import org.apache.hadoop.hive.ql.plan.ShowTableStatusDesc;
@@ -299,10 +299,16 @@ public class HCatSemanticAnalyzer extend
         // table is partitioned.
       } else {
         //this is actually a ALTER TABLE DROP PARITITION statement
-        for (Map<String, String> partSpec : dropTable.getPartSpecs()) {
+        for (PartitionSpec partSpec : dropTable.getPartSpecs()) {
           // partitions are not added as write entries in drop partitions in Hive
           Table table = hive.getTable(hive.getCurrentDatabase(), dropTable.getTableName());
-          List<Partition> partitions = hive.getPartitions(table, partSpec);
+          List<Partition> partitions = null;
+          try {
+            partitions = hive.getPartitionsByFilter(table, partSpec.toString());
+           } catch (Exception e) {
+            throw new HiveException(e);
+           }
+
           for (Partition part : partitions) {
             authorize(part, Privilege.DROP);
           }



Mime
View raw message