hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject svn commit: r1635636 - in /hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql: ErrorMsg.java parse/DDLSemanticAnalyzer.java
Date Thu, 30 Oct 2014 23:15:15 GMT
Author: jdere
Date: Thu Oct 30 23:15:14 2014
New Revision: 1635636

URL: http://svn.apache.org/r1635636
Log:
HIVE-8579: Guaranteed NPE in DDLSemanticAnalyzer (Jason Dere, reviewed by Vaibhav Gumashta)

Modified:
    hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
    hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java

Modified: hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java?rev=1635636&r1=1635635&r2=1635636&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java (original)
+++ hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java Thu Oct
30 23:15:14 2014
@@ -422,7 +422,7 @@ public enum ErrorMsg {
   ACID_NO_SORTED_BUCKETS(10298, "ACID insert, update, delete not supported on tables that
are " +
       "sorted, table {0}", true),
   ALTER_TABLE_TYPE_PARTIAL_PARTITION_SPEC_NO_SUPPORTED(10299,
-      "Alter table partition type {0} does not allow partial partition spec"),
+      "Alter table partition type {0} does not allow partial partition spec", true),
 
   //========================== 20000 range starts here ========================//
   SCRIPT_INIT_ERROR(20000, "Unable to initialize custom script."),

Modified: hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java?rev=1635636&r1=1635635&r2=1635636&view=diff
==============================================================================
--- hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
(original)
+++ hive/branches/branch-0.14/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
Thu Oct 30 23:15:14 2014
@@ -1408,8 +1408,9 @@ public class DDLSemanticAnalyzer extends
         // Partial partition spec supplied. Make sure this is allowed.
         if (desc == null
             || !AlterTableDesc.doesAlterTableTypeSupportPartialPartitionSpec(desc.getOp()))
{
+          String alterTabletype = (desc != null) ? desc.getOp().name() : "";
           throw new SemanticException(
-              ErrorMsg.ALTER_TABLE_TYPE_PARTIAL_PARTITION_SPEC_NO_SUPPORTED, desc.getOp().name());
+              ErrorMsg.ALTER_TABLE_TYPE_PARTIAL_PARTITION_SPEC_NO_SUPPORTED, alterTabletype);
         } else if (!conf.getBoolVar(HiveConf.ConfVars.DYNAMICPARTITIONING)) {
           throw new SemanticException(ErrorMsg.DYNAMIC_PARTITION_DISABLED);
         }



Mime
View raw message