hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jd...@apache.org
Subject svn commit: r1632645 - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/ java/org/apache/hadoop/hive/ql/exec/ java/org/apache/hadoop/hive/ql/parse/ java/org/apache/hadoop/hive/ql/plan/ test/queries/clientnegative/ test/queries/clientpositive/ test...
Date Fri, 17 Oct 2014 18:30:08 GMT
Author: jdere
Date: Fri Oct 17 18:30:08 2014
New Revision: 1632645

URL: http://svn.apache.org/r1632645
Log:
HIVE-8411: Support partial partition spec for certain ALTER PARTITION statements (Jason Dere, reviewed by Gunther Hagleitner)

Added:
    hive/trunk/ql/src/test/queries/clientnegative/alter_partition_partial_spec_dyndisabled.q
    hive/trunk/ql/src/test/results/clientnegative/alter_partition_partial_spec_dyndisabled.q.out
Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
    hive/trunk/ql/src/test/queries/clientpositive/alter_partition_change_col.q
    hive/trunk/ql/src/test/results/clientpositive/alter_partition_change_col.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java?rev=1632645&r1=1632644&r2=1632645&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java Fri Oct 17 18:30:08 2014
@@ -421,6 +421,8 @@ public enum ErrorMsg {
       "an AcidOutputFormat or is not bucketed", true),
   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"),
 
   //========================== 20000 range starts here ========================//
   SCRIPT_INIT_ERROR(20000, "Unable to initialize custom script."),

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java?rev=1632645&r1=1632644&r2=1632645&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java Fri Oct 17 18:30:08 2014
@@ -88,6 +88,7 @@ import org.apache.hadoop.hive.ql.metadat
 import org.apache.hadoop.hive.ql.metadata.formatting.MetaDataFormatter;
 import org.apache.hadoop.hive.ql.parse.AlterTablePartMergeFilesDesc;
 import org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer;
+import org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer;
 import org.apache.hadoop.hive.ql.plan.AddPartitionDesc;
 import org.apache.hadoop.hive.ql.plan.AlterDatabaseDesc;
 import org.apache.hadoop.hive.ql.plan.AlterIndexDesc;
@@ -3279,22 +3280,77 @@ public class DDLTask extends Task<DDLWor
     // alter the table
     Table tbl = db.getTable(alterTbl.getOldName());
 
-    Partition part = null;
     List<Partition> allPartitions = null;
     if (alterTbl.getPartSpec() != null) {
-      if (alterTbl.getOp() != AlterTableDesc.AlterTableTypes.ALTERPROTECTMODE) {
-        part = db.getPartition(tbl, alterTbl.getPartSpec(), false);
+      Map<String, String> partSpec = alterTbl.getPartSpec(); 
+      if (DDLSemanticAnalyzer.isFullSpec(tbl, partSpec)) {
+        allPartitions = new ArrayList<Partition>();
+        Partition part = db.getPartition(tbl, partSpec, false);
         if (part == null) {
+          // User provided a fully specified partition spec but it doesn't exist, fail.
           throw new HiveException(ErrorMsg.INVALID_PARTITION,
-              StringUtils.join(alterTbl.getPartSpec().keySet(), ',') + " for table " + alterTbl.getOldName());
+                StringUtils.join(alterTbl.getPartSpec().keySet(), ',') + " for table " + alterTbl.getOldName());
+
         }
-      }
-      else {
+        allPartitions.add(part);
+      } else {
+        // DDLSemanticAnalyzer has already checked if partial partition specs are allowed,
+        // thus we should not need to check it here.
         allPartitions = db.getPartitions(tbl, alterTbl.getPartSpec());
       }
     }
 
     Table oldTbl = tbl.copy();
+    if (allPartitions != null) {
+      // Alter all partitions
+      for (Partition part : allPartitions) {
+        alterTableOrSinglePartition(alterTbl, tbl, part);
+      }
+    } else {
+      // Just alter the table
+      alterTableOrSinglePartition(alterTbl, tbl, null);
+    }
+
+    if (allPartitions == null) {
+      updateModifiedParameters(tbl.getTTable().getParameters(), conf);
+      tbl.checkValidity();
+    } else {
+      for (Partition tmpPart: allPartitions) {
+        updateModifiedParameters(tmpPart.getParameters(), conf);
+      }
+    }
+
+    try {
+      if (allPartitions == null) {
+        db.alterTable(alterTbl.getOldName(), tbl);
+      } else {
+        db.alterPartitions(tbl.getTableName(), allPartitions);
+      }
+    } catch (InvalidOperationException e) {
+      LOG.error("alter table: " + stringifyException(e));
+      throw new HiveException(e, ErrorMsg.GENERIC_ERROR);
+    }
+
+    // This is kind of hacky - the read entity contains the old table, whereas
+    // the write entity
+    // contains the new table. This is needed for rename - both the old and the
+    // new table names are
+    // passed
+    // Don't acquire locks for any of these, we have already asked for them in DDLSemanticAnalyzer.
+    if (allPartitions != null ) {
+      for (Partition tmpPart: allPartitions) {
+        work.getInputs().add(new ReadEntity(tmpPart));
+        work.getOutputs().add(new WriteEntity(tmpPart, WriteEntity.WriteType.DDL_NO_LOCK));
+      }
+    } else {
+      work.getInputs().add(new ReadEntity(oldTbl));
+      work.getOutputs().add(new WriteEntity(tbl, WriteEntity.WriteType.DDL_NO_LOCK));
+    }
+    return 0;
+  }
+
+  private int alterTableOrSinglePartition(AlterTableDesc alterTbl, Table tbl, Partition part)
+      throws HiveException {
     List<FieldSchema> oldCols = (part == null ? tbl.getCols() : part.getCols());
     StorageDescriptor sd = (part == null ? tbl.getTTable().getSd() : part.getTPartition().getSd());
 
@@ -3440,12 +3496,10 @@ public class DDLTask extends Task<DDLWor
       AlterTableDesc.ProtectModeType protectMode = alterTbl.getProtectModeType();
 
       ProtectMode mode = null;
-      if (allPartitions != null) {
-        for (Partition tmpPart: allPartitions) {
-          mode = tmpPart.getProtectMode();
-          setAlterProtectMode(protectModeEnable, protectMode, mode);
-          tmpPart.setProtectMode(mode);
-        }
+      if (part != null) {
+        mode = part.getProtectMode();
+        setAlterProtectMode(protectModeEnable, protectMode, mode);
+        part.setProtectMode(mode);
       } else {
         mode = tbl.getProtectMode();
         setAlterProtectMode(protectModeEnable,protectMode, mode);
@@ -3488,12 +3542,12 @@ public class DDLTask extends Task<DDLWor
         throw new HiveException(e);
       }
     } else if (alterTbl.getOp() == AlterTableDesc.AlterTableTypes.ADDSKEWEDBY) {
-      /* Validation's been done at compile time. no validation is needed here. */
+      // Validation's been done at compile time. no validation is needed here.
       List<String> skewedColNames = null;
       List<List<String>> skewedValues = null;
 
       if (alterTbl.isTurnOffSkewed()) {
-        /* Convert skewed table to non-skewed table. */
+        // Convert skewed table to non-skewed table.
         skewedColNames = new ArrayList<String>();
         skewedValues = new ArrayList<List<String>>();
       } else {
@@ -3502,7 +3556,7 @@ public class DDLTask extends Task<DDLWor
       }
 
       if ( null == tbl.getSkewedInfo()) {
-        /* Convert non-skewed table to skewed table. */
+        // Convert non-skewed table to skewed table.
         SkewedInfo skewedInfo = new SkewedInfo();
         skewedInfo.setSkewedColNames(skewedColNames);
         skewedInfo.setSkewedColValues(skewedValues);
@@ -3544,59 +3598,12 @@ public class DDLTask extends Task<DDLWor
         }
         tbl.setNumBuckets(alterTbl.getNumberBuckets());
       }
-   } else {
+    } else {
       throw new HiveException(ErrorMsg.UNSUPPORTED_ALTER_TBL_OP, alterTbl.getOp().toString());
     }
 
-    if (part == null && allPartitions == null) {
-      updateModifiedParameters(tbl.getTTable().getParameters(), conf);
-      tbl.checkValidity();
-    } else if (part != null) {
-      updateModifiedParameters(part.getParameters(), conf);
-    }
-    else {
-      for (Partition tmpPart: allPartitions) {
-        updateModifiedParameters(tmpPart.getParameters(), conf);
-      }
-    }
-
-    try {
-      if (part == null && allPartitions == null) {
-        db.alterTable(alterTbl.getOldName(), tbl);
-      } else if (part != null) {
-        db.alterPartition(tbl.getTableName(), part);
-      }
-      else {
-        db.alterPartitions(tbl.getTableName(), allPartitions);
-      }
-    } catch (InvalidOperationException e) {
-      LOG.info("alter table: " + stringifyException(e));
-      throw new HiveException(e, ErrorMsg.GENERIC_ERROR);
-    }
-
-    // This is kind of hacky - the read entity contains the old table, whereas
-    // the write entity
-    // contains the new table. This is needed for rename - both the old and the
-    // new table names are
-    // passed
-    // Don't acquire locks for any of these, we have already asked for them in DDLSemanticAnalyzer.
-    if(part != null) {
-      work.getInputs().add(new ReadEntity(part));
-      work.getOutputs().add(new WriteEntity(part, WriteEntity.WriteType.DDL_NO_LOCK));
-    }
-    else if (allPartitions != null ){
-      for (Partition tmpPart: allPartitions) {
-        work.getInputs().add(new ReadEntity(tmpPart));
-        work.getOutputs().add(new WriteEntity(tmpPart, WriteEntity.WriteType.DDL_NO_LOCK));
-      }
-    }
-    else {
-      work.getInputs().add(new ReadEntity(oldTbl));
-      work.getOutputs().add(new WriteEntity(tbl, WriteEntity.WriteType.DDL_NO_LOCK));
-    }
     return 0;
   }
-
   /**
    * Drop a given table or some partitions. DropTableDesc is currently used for both.
    *

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java?rev=1632645&r1=1632644&r2=1632645&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java Fri Oct 17 18:30:08 2014
@@ -1017,7 +1017,7 @@ public class DDLSemanticAnalyzer extends
     rootTasks.add(truncateTask);
   }
 
-  private boolean isFullSpec(Table table, Map<String, String> partSpec) {
+  public static boolean isFullSpec(Table table, Map<String, String> partSpec) {
     for (FieldSchema partCol : table.getPartCols()) {
       if (partSpec.get(partCol.getName()) == null) {
         return false;
@@ -1387,11 +1387,21 @@ public class DDLSemanticAnalyzer extends
       // ReadEntity as no lock.
       re.noLockNeeded();
       inputs.add(re);
-      if (desc == null || desc.getOp() != AlterTableDesc.AlterTableTypes.ALTERPROTECTMODE) {
+
+      if (isFullSpec(tab, partSpec)) {
+        // Fully specified partition spec
         Partition part = getPartition(tab, partSpec, true);
-        outputs.add(new WriteEntity(part, writeType));
-      }
-      else {
+        outputs.add(new WriteEntity(part, writeType));        
+      } else {
+        // Partial partition spec supplied. Make sure this is allowed.
+        if (desc == null
+            || !AlterTableDesc.doesAlterTableTypeSupportPartialPartitionSpec(desc.getOp())) {
+          throw new SemanticException(
+              ErrorMsg.ALTER_TABLE_TYPE_PARTIAL_PARTITION_SPEC_NO_SUPPORTED, desc.getOp().name());
+        } else if (!conf.getBoolVar(HiveConf.ConfVars.DYNAMICPARTITIONING)) {
+          throw new SemanticException(ErrorMsg.DYNAMIC_PARTITION_DISABLED);
+        }
+
         for (Partition part : getPartitions(tab, partSpec, true)) {
           outputs.add(new WriteEntity(part, writeType));
         }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java?rev=1632645&r1=1632644&r2=1632645&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/AlterTableDesc.java Fri Oct 17 18:30:08 2014
@@ -21,8 +21,10 @@ package org.apache.hadoop.hive.ql.plan;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.Order;
@@ -63,6 +65,20 @@ public class AlterTableDesc extends DDLD
     NO_DROP, OFFLINE, READ_ONLY, NO_DROP_CASCADE
   }
 
+  public static final Set<AlterTableTypes> alterTableTypesWithPartialSpec =
+      new HashSet<AlterTableDesc.AlterTableTypes>();
+
+  static {
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.ALTERPROTECTMODE);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.ADDCOLS);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.REPLACECOLS);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.RENAMECOLUMN);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.ADDPROPS);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.DROPPROPS);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.ADDSERDE);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.ADDSERDEPROPS);
+    alterTableTypesWithPartialSpec.add(AlterTableDesc.AlterTableTypes.ADDFILEFORMAT);
+  }
 
   AlterTableTypes op;
   String oldName;
@@ -704,5 +720,8 @@ public class AlterTableDesc extends DDLD
     return isDropIfExists;
   }
 
+  public static boolean doesAlterTableTypeSupportPartialPartitionSpec(AlterTableTypes type) {
+    return alterTableTypesWithPartialSpec.contains(type);
+  }
 
 }

Added: hive/trunk/ql/src/test/queries/clientnegative/alter_partition_partial_spec_dyndisabled.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientnegative/alter_partition_partial_spec_dyndisabled.q?rev=1632645&view=auto
==============================================================================
--- hive/trunk/ql/src/test/queries/clientnegative/alter_partition_partial_spec_dyndisabled.q (added)
+++ hive/trunk/ql/src/test/queries/clientnegative/alter_partition_partial_spec_dyndisabled.q Fri Oct 17 18:30:08 2014
@@ -0,0 +1,13 @@
+SET hive.exec.dynamic.partition = true;
+SET hive.exec.dynamic.partition.mode = nonstrict;
+
+create table alter_partition_partial_spec_dyndisabled0 (c1 string) partitioned by (p1 string, p2 string);
+
+alter table alter_partition_partial_spec_dyndisabled0 add partition (p1='abc', p2='123');
+alter table alter_partition_partial_spec_dyndisabled0 partition (p1, p2) change c1 c1 int;
+
+describe alter_partition_partial_spec_dyndisabled0 partition (p1='abc', p2='123');
+
+SET hive.exec.dynamic.partition = false;
+-- Same statement should fail if dynamic partitioning disabled
+alter table alter_partition_partial_spec_dyndisabled0 partition (p1, p2) change c1 c1 int;

Modified: hive/trunk/ql/src/test/queries/clientpositive/alter_partition_change_col.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/alter_partition_change_col.q?rev=1632645&r1=1632644&r2=1632645&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/alter_partition_change_col.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/alter_partition_change_col.q Fri Oct 17 18:30:08 2014
@@ -6,54 +6,70 @@ SET hive.exec.dynamic.partition.mode = n
 create table alter_partition_change_col0 (c1 string, c2 string);
 load data local inpath '../../data/files/dec.txt' overwrite into table alter_partition_change_col0;
 
-create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string);
+create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string, p2 string);
 
-insert overwrite table alter_partition_change_col1 partition (p1)
-  select c1, c2, 'abc' from alter_partition_change_col0
+insert overwrite table alter_partition_change_col1 partition (p1, p2)
+  select c1, c2, 'abc', '123' from alter_partition_change_col0
   union all
-  select c1, c2, null from alter_partition_change_col0;
+  select c1, c2, null, '123' from alter_partition_change_col0;
   
 show partitions alter_partition_change_col1;
-select * from alter_partition_change_col1;
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
 
 -- Change c2 to decimal(10,0)
 alter table alter_partition_change_col1 change c2 c2 decimal(10,0);
-alter table alter_partition_change_col1 partition (p1='abc') change c2 c2 decimal(10,0);
-alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__') change c2 c2 decimal(10,0);
-select * from alter_partition_change_col1;
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(10,0);
+alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(10,0);
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
 
 -- Change the column type at the table level. Table-level describe shows the new type, but the existing partition does not.
 alter table alter_partition_change_col1 change c2 c2 decimal(14,4);
 describe alter_partition_change_col1;
-describe alter_partition_change_col1 partition (p1='abc');
-select * from alter_partition_change_col1;
+describe alter_partition_change_col1 partition (p1='abc', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
 
 -- now change the column type of the existing partition
-alter table alter_partition_change_col1 partition (p1='abc') change c2 c2 decimal(14,4);
-describe alter_partition_change_col1 partition (p1='abc');
-select * from alter_partition_change_col1;
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(14,4);
+describe alter_partition_change_col1 partition (p1='abc', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
 
 -- change column for default partition value
-alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__') change c2 c2 decimal(14,4);
-describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__');
-select * from alter_partition_change_col1;
+alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(14,4);
+describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
 
 -- Try out replace columns
-alter table alter_partition_change_col1 partition (p1='abc') replace columns (c1 string);
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') replace columns (c1 string);
 describe alter_partition_change_col1;
-describe alter_partition_change_col1 partition (p1='abc');
-select * from alter_partition_change_col1;
+describe alter_partition_change_col1 partition (p1='abc', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
+
 alter table alter_partition_change_col1 replace columns (c1 string);
 describe alter_partition_change_col1;
-select * from alter_partition_change_col1;
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
 
 -- Try add columns
 alter table alter_partition_change_col1 add columns (c2 decimal(14,4));
 describe alter_partition_change_col1;
-describe alter_partition_change_col1 partition (p1='abc');
-select * from alter_partition_change_col1;
-
-alter table alter_partition_change_col1 partition (p1='abc') add columns (c2 decimal(14,4));
-describe alter_partition_change_col1 partition (p1='abc');
-select * from alter_partition_change_col1;
-
+describe alter_partition_change_col1 partition (p1='abc', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
+
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') add columns (c2 decimal(14,4));
+describe alter_partition_change_col1 partition (p1='abc', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';
+
+-- Try changing column for all partitions at once
+alter table alter_partition_change_col1 partition (p1, p2='123') change column c2 c2 decimal(10,0);
+describe alter_partition_change_col1 partition (p1='abc', p2='123');
+describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123');
+select * from alter_partition_change_col1 where p1='abc';
+select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__';

Added: hive/trunk/ql/src/test/results/clientnegative/alter_partition_partial_spec_dyndisabled.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientnegative/alter_partition_partial_spec_dyndisabled.q.out?rev=1632645&view=auto
==============================================================================
--- hive/trunk/ql/src/test/results/clientnegative/alter_partition_partial_spec_dyndisabled.q.out (added)
+++ hive/trunk/ql/src/test/results/clientnegative/alter_partition_partial_spec_dyndisabled.q.out Fri Oct 17 18:30:08 2014
@@ -0,0 +1,40 @@
+PREHOOK: query: create table alter_partition_partial_spec_dyndisabled0 (c1 string) partitioned by (p1 string, p2 string)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@alter_partition_partial_spec_dyndisabled0
+POSTHOOK: query: create table alter_partition_partial_spec_dyndisabled0 (c1 string) partitioned by (p1 string, p2 string)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@alter_partition_partial_spec_dyndisabled0
+PREHOOK: query: alter table alter_partition_partial_spec_dyndisabled0 add partition (p1='abc', p2='123')
+PREHOOK: type: ALTERTABLE_ADDPARTS
+PREHOOK: Output: default@alter_partition_partial_spec_dyndisabled0
+POSTHOOK: query: alter table alter_partition_partial_spec_dyndisabled0 add partition (p1='abc', p2='123')
+POSTHOOK: type: ALTERTABLE_ADDPARTS
+POSTHOOK: Output: default@alter_partition_partial_spec_dyndisabled0
+POSTHOOK: Output: default@alter_partition_partial_spec_dyndisabled0@p1=abc/p2=123
+PREHOOK: query: alter table alter_partition_partial_spec_dyndisabled0 partition (p1, p2) change c1 c1 int
+PREHOOK: type: ALTERTABLE_RENAMECOL
+PREHOOK: Input: default@alter_partition_partial_spec_dyndisabled0
+PREHOOK: Output: default@alter_partition_partial_spec_dyndisabled0@p1=abc/p2=123
+POSTHOOK: query: alter table alter_partition_partial_spec_dyndisabled0 partition (p1, p2) change c1 c1 int
+POSTHOOK: type: ALTERTABLE_RENAMECOL
+POSTHOOK: Input: default@alter_partition_partial_spec_dyndisabled0
+POSTHOOK: Input: default@alter_partition_partial_spec_dyndisabled0@p1=abc/p2=123
+POSTHOOK: Output: default@alter_partition_partial_spec_dyndisabled0@p1=abc/p2=123
+PREHOOK: query: describe alter_partition_partial_spec_dyndisabled0 partition (p1='abc', p2='123')
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@alter_partition_partial_spec_dyndisabled0
+POSTHOOK: query: describe alter_partition_partial_spec_dyndisabled0 partition (p1='abc', p2='123')
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@alter_partition_partial_spec_dyndisabled0
+c1                  	int                 	                    
+p1                  	string              	                    
+p2                  	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+p1                  	string              	                    
+p2                  	string              	                    
+FAILED: SemanticException [Error 10095]: Dynamic partition is disabled. Either enable it by setting hive.exec.dynamic.partition=true or specify partition column values

Modified: hive/trunk/ql/src/test/results/clientpositive/alter_partition_change_col.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/alter_partition_change_col.q.out?rev=1632645&r1=1632644&r2=1632645&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/alter_partition_change_col.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/alter_partition_change_col.q.out Fri Oct 17 18:30:08 2014
@@ -18,73 +18,81 @@ POSTHOOK: query: load data local inpath 
 POSTHOOK: type: LOAD
 #### A masked pattern was here ####
 POSTHOOK: Output: default@alter_partition_change_col0
-PREHOOK: query: create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string)
+PREHOOK: query: create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string, p2 string)
 PREHOOK: type: CREATETABLE
 PREHOOK: Output: database:default
 PREHOOK: Output: default@alter_partition_change_col1
-POSTHOOK: query: create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string)
+POSTHOOK: query: create table alter_partition_change_col1 (c1 string, c2 string) partitioned by (p1 string, p2 string)
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: database:default
 POSTHOOK: Output: default@alter_partition_change_col1
-PREHOOK: query: insert overwrite table alter_partition_change_col1 partition (p1)
-  select c1, c2, 'abc' from alter_partition_change_col0
+PREHOOK: query: insert overwrite table alter_partition_change_col1 partition (p1, p2)
+  select c1, c2, 'abc', '123' from alter_partition_change_col0
   union all
-  select c1, c2, null from alter_partition_change_col0
+  select c1, c2, null, '123' from alter_partition_change_col0
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col0
 PREHOOK: Output: default@alter_partition_change_col1
-POSTHOOK: query: insert overwrite table alter_partition_change_col1 partition (p1)
-  select c1, c2, 'abc' from alter_partition_change_col0
+POSTHOOK: query: insert overwrite table alter_partition_change_col1 partition (p1, p2)
+  select c1, c2, 'abc', '123' from alter_partition_change_col0
   union all
-  select c1, c2, null from alter_partition_change_col0
+  select c1, c2, null, '123' from alter_partition_change_col0
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col0
-POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Output: default@alter_partition_change_col1@p1=abc
-POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=__HIVE_DEFAULT_PARTITION__).c1 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), ]
-POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=__HIVE_DEFAULT_PARTITION__).c2 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), ]
-POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=abc).c1 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), ]
-POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=abc).c2 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), ]
+POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=__HIVE_DEFAULT_PARTITION__,p2=123).c1 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), ]
+POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=__HIVE_DEFAULT_PARTITION__,p2=123).c2 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), ]
+POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=abc,p2=123).c1 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c1, type:string, comment:null), ]
+POSTHOOK: Lineage: alter_partition_change_col1 PARTITION(p1=abc,p2=123).c2 EXPRESSION [(alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), (alter_partition_change_col0)alter_partition_change_col0.FieldSchema(name:c2, type:string, comment:null), ]
 PREHOOK: query: show partitions alter_partition_change_col1
 PREHOOK: type: SHOWPARTITIONS
 PREHOOK: Input: default@alter_partition_change_col1
 POSTHOOK: query: show partitions alter_partition_change_col1
 POSTHOOK: type: SHOWPARTITIONS
 POSTHOOK: Input: default@alter_partition_change_col1
-p1=__HIVE_DEFAULT_PARTITION__
-p1=abc
-PREHOOK: query: select * from alter_partition_change_col1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	0.0	__HIVE_DEFAULT_PARTITION__
-Beck	0.0	abc
-Beck	77.341	__HIVE_DEFAULT_PARTITION__
-Beck	77.341	abc
-Beck	79.9	__HIVE_DEFAULT_PARTITION__
-Beck	79.9	abc
-Cluck	5.96	__HIVE_DEFAULT_PARTITION__
-Cluck	5.96	abc
-Mary	33.33	__HIVE_DEFAULT_PARTITION__
-Mary	33.33	abc
-Mary	4.329	__HIVE_DEFAULT_PARTITION__
-Mary	4.329	abc
-Snow	55.71	__HIVE_DEFAULT_PARTITION__
-Snow	55.71	abc
-Tom	-12.25	__HIVE_DEFAULT_PARTITION__
-Tom	-12.25	abc
-Tom	19.00	__HIVE_DEFAULT_PARTITION__
-Tom	19.00	abc
-Tom	234.79	__HIVE_DEFAULT_PARTITION__
-Tom	234.79	abc
+p1=__HIVE_DEFAULT_PARTITION__/p2=123
+p1=abc/p2=123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0.0	abc	123
+Beck	77.341	abc	123
+Beck	79.9	abc	123
+Cluck	5.96	abc	123
+Mary	33.33	abc	123
+Mary	4.329	abc	123
+Snow	55.71	abc	123
+Tom	-12.25	abc	123
+Tom	19.00	abc	123
+Tom	234.79	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0.0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77.341	__HIVE_DEFAULT_PARTITION__	123
+Beck	79.9	__HIVE_DEFAULT_PARTITION__	123
+Cluck	5.96	__HIVE_DEFAULT_PARTITION__	123
+Mary	33.33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4.329	__HIVE_DEFAULT_PARTITION__	123
+Snow	55.71	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12.25	__HIVE_DEFAULT_PARTITION__	123
+Tom	19.00	__HIVE_DEFAULT_PARTITION__	123
+Tom	234.79	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: -- Change c2 to decimal(10,0)
 alter table alter_partition_change_col1 change c2 c2 decimal(10,0)
 PREHOOK: type: ALTERTABLE_RENAMECOL
@@ -95,56 +103,64 @@ alter table alter_partition_change_col1 
 POSTHOOK: type: ALTERTABLE_RENAMECOL
 POSTHOOK: Input: default@alter_partition_change_col1
 POSTHOOK: Output: default@alter_partition_change_col1
-PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc') change c2 c2 decimal(10,0)
+PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(10,0)
 PREHOOK: type: ALTERTABLE_RENAMECOL
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Output: default@alter_partition_change_col1@p1=abc
-POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc') change c2 c2 decimal(10,0)
+PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(10,0)
 POSTHOOK: type: ALTERTABLE_RENAMECOL
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-POSTHOOK: Output: default@alter_partition_change_col1@p1=abc
-PREHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__') change c2 c2 decimal(10,0)
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+PREHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(10,0)
 PREHOOK: type: ALTERTABLE_RENAMECOL
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__') change c2 c2 decimal(10,0)
+PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(10,0)
 POSTHOOK: type: ALTERTABLE_RENAMECOL
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: query: select * from alter_partition_change_col1
-PREHOOK: type: QUERY
-PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	0	__HIVE_DEFAULT_PARTITION__
-Beck	0	abc
-Beck	77	__HIVE_DEFAULT_PARTITION__
-Beck	77	abc
-Beck	80	__HIVE_DEFAULT_PARTITION__
-Beck	80	abc
-Cluck	6	__HIVE_DEFAULT_PARTITION__
-Cluck	6	abc
-Mary	33	__HIVE_DEFAULT_PARTITION__
-Mary	33	abc
-Mary	4	__HIVE_DEFAULT_PARTITION__
-Mary	4	abc
-Snow	56	__HIVE_DEFAULT_PARTITION__
-Snow	56	abc
-Tom	-12	__HIVE_DEFAULT_PARTITION__
-Tom	-12	abc
-Tom	19	__HIVE_DEFAULT_PARTITION__
-Tom	19	abc
-Tom	235	__HIVE_DEFAULT_PARTITION__
-Tom	235	abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0	abc	123
+Beck	77	abc	123
+Beck	80	abc	123
+Cluck	6	abc	123
+Mary	33	abc	123
+Mary	4	abc	123
+Snow	56	abc	123
+Tom	-12	abc	123
+Tom	19	abc	123
+Tom	235	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77	__HIVE_DEFAULT_PARTITION__	123
+Beck	80	__HIVE_DEFAULT_PARTITION__	123
+Cluck	6	__HIVE_DEFAULT_PARTITION__	123
+Mary	33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4	__HIVE_DEFAULT_PARTITION__	123
+Snow	56	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12	__HIVE_DEFAULT_PARTITION__	123
+Tom	19	__HIVE_DEFAULT_PARTITION__	123
+Tom	235	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: -- Change the column type at the table level. Table-level describe shows the new type, but the existing partition does not.
 alter table alter_partition_change_col1 change c2 c2 decimal(14,4)
 PREHOOK: type: ALTERTABLE_RENAMECOL
@@ -164,182 +180,214 @@ POSTHOOK: Input: default@alter_partition
 c1                  	string              	                    
 c2                  	decimal(14,4)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+p2                  	string              	                    
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 c2                  	decimal(10,0)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0	abc	123
+Beck	77	abc	123
+Beck	80	abc	123
+Cluck	6	abc	123
+Mary	33	abc	123
+Mary	4	abc	123
+Snow	56	abc	123
+Tom	-12	abc	123
+Tom	19	abc	123
+Tom	235	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	0	__HIVE_DEFAULT_PARTITION__
-Beck	0	abc
-Beck	77	__HIVE_DEFAULT_PARTITION__
-Beck	77	abc
-Beck	80	__HIVE_DEFAULT_PARTITION__
-Beck	80	abc
-Cluck	6	__HIVE_DEFAULT_PARTITION__
-Cluck	6	abc
-Mary	33	__HIVE_DEFAULT_PARTITION__
-Mary	33	abc
-Mary	4	__HIVE_DEFAULT_PARTITION__
-Mary	4	abc
-Snow	56	__HIVE_DEFAULT_PARTITION__
-Snow	56	abc
-Tom	-12	__HIVE_DEFAULT_PARTITION__
-Tom	-12	abc
-Tom	19	__HIVE_DEFAULT_PARTITION__
-Tom	19	abc
-Tom	235	__HIVE_DEFAULT_PARTITION__
-Tom	235	abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77	__HIVE_DEFAULT_PARTITION__	123
+Beck	80	__HIVE_DEFAULT_PARTITION__	123
+Cluck	6	__HIVE_DEFAULT_PARTITION__	123
+Mary	33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4	__HIVE_DEFAULT_PARTITION__	123
+Snow	56	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12	__HIVE_DEFAULT_PARTITION__	123
+Tom	19	__HIVE_DEFAULT_PARTITION__	123
+Tom	235	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: -- now change the column type of the existing partition
-alter table alter_partition_change_col1 partition (p1='abc') change c2 c2 decimal(14,4)
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(14,4)
 PREHOOK: type: ALTERTABLE_RENAMECOL
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Output: default@alter_partition_change_col1@p1=abc
+PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
 POSTHOOK: query: -- now change the column type of the existing partition
-alter table alter_partition_change_col1 partition (p1='abc') change c2 c2 decimal(14,4)
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') change c2 c2 decimal(14,4)
 POSTHOOK: type: ALTERTABLE_RENAMECOL
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-POSTHOOK: Output: default@alter_partition_change_col1@p1=abc
-PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 c2                  	decimal(14,4)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0.0	abc	123
+Beck	77.341	abc	123
+Beck	79.9	abc	123
+Cluck	5.96	abc	123
+Mary	33.33	abc	123
+Mary	4.329	abc	123
+Snow	55.71	abc	123
+Tom	-12.25	abc	123
+Tom	19.00	abc	123
+Tom	234.79	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	0	__HIVE_DEFAULT_PARTITION__
-Beck	0.0	abc
-Beck	77	__HIVE_DEFAULT_PARTITION__
-Beck	77.341	abc
-Beck	79.9	abc
-Beck	80	__HIVE_DEFAULT_PARTITION__
-Cluck	5.96	abc
-Cluck	6	__HIVE_DEFAULT_PARTITION__
-Mary	33	__HIVE_DEFAULT_PARTITION__
-Mary	33.33	abc
-Mary	4	__HIVE_DEFAULT_PARTITION__
-Mary	4.329	abc
-Snow	55.71	abc
-Snow	56	__HIVE_DEFAULT_PARTITION__
-Tom	-12	__HIVE_DEFAULT_PARTITION__
-Tom	-12.25	abc
-Tom	19	__HIVE_DEFAULT_PARTITION__
-Tom	19.00	abc
-Tom	234.79	abc
-Tom	235	__HIVE_DEFAULT_PARTITION__
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77	__HIVE_DEFAULT_PARTITION__	123
+Beck	80	__HIVE_DEFAULT_PARTITION__	123
+Cluck	6	__HIVE_DEFAULT_PARTITION__	123
+Mary	33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4	__HIVE_DEFAULT_PARTITION__	123
+Snow	56	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12	__HIVE_DEFAULT_PARTITION__	123
+Tom	19	__HIVE_DEFAULT_PARTITION__	123
+Tom	235	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: -- change column for default partition value
-alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__') change c2 c2 decimal(14,4)
+alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(14,4)
 PREHOOK: type: ALTERTABLE_RENAMECOL
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
+PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 POSTHOOK: query: -- change column for default partition value
-alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__') change c2 c2 decimal(14,4)
+alter table alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123') change c2 c2 decimal(14,4)
 POSTHOOK: type: ALTERTABLE_RENAMECOL
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__')
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123')
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__')
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123')
 POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 c2                  	decimal(14,4)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0.0	abc	123
+Beck	77.341	abc	123
+Beck	79.9	abc	123
+Cluck	5.96	abc	123
+Mary	33.33	abc	123
+Mary	4.329	abc	123
+Snow	55.71	abc	123
+Tom	-12.25	abc	123
+Tom	19.00	abc	123
+Tom	234.79	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	0.0	__HIVE_DEFAULT_PARTITION__
-Beck	0.0	abc
-Beck	77.341	__HIVE_DEFAULT_PARTITION__
-Beck	77.341	abc
-Beck	79.9	__HIVE_DEFAULT_PARTITION__
-Beck	79.9	abc
-Cluck	5.96	__HIVE_DEFAULT_PARTITION__
-Cluck	5.96	abc
-Mary	33.33	__HIVE_DEFAULT_PARTITION__
-Mary	33.33	abc
-Mary	4.329	__HIVE_DEFAULT_PARTITION__
-Mary	4.329	abc
-Snow	55.71	__HIVE_DEFAULT_PARTITION__
-Snow	55.71	abc
-Tom	-12.25	__HIVE_DEFAULT_PARTITION__
-Tom	-12.25	abc
-Tom	19.00	__HIVE_DEFAULT_PARTITION__
-Tom	19.00	abc
-Tom	234.79	__HIVE_DEFAULT_PARTITION__
-Tom	234.79	abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0.0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77.341	__HIVE_DEFAULT_PARTITION__	123
+Beck	79.9	__HIVE_DEFAULT_PARTITION__	123
+Cluck	5.96	__HIVE_DEFAULT_PARTITION__	123
+Mary	33.33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4.329	__HIVE_DEFAULT_PARTITION__	123
+Snow	55.71	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12.25	__HIVE_DEFAULT_PARTITION__	123
+Tom	19.00	__HIVE_DEFAULT_PARTITION__	123
+Tom	234.79	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: -- Try out replace columns
-alter table alter_partition_change_col1 partition (p1='abc') replace columns (c1 string)
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') replace columns (c1 string)
 PREHOOK: type: ALTERTABLE_REPLACECOLS
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Output: default@alter_partition_change_col1@p1=abc
+PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
 POSTHOOK: query: -- Try out replace columns
-alter table alter_partition_change_col1 partition (p1='abc') replace columns (c1 string)
+alter table alter_partition_change_col1 partition (p1='abc', p2='123') replace columns (c1 string)
 POSTHOOK: type: ALTERTABLE_REPLACECOLS
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-POSTHOOK: Output: default@alter_partition_change_col1@p1=abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
 PREHOOK: query: describe alter_partition_change_col1
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
@@ -349,56 +397,68 @@ POSTHOOK: Input: default@alter_partition
 c1                  	string              	                    
 c2                  	decimal(14,4)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+p2                  	string              	                    
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	NULL	abc	123
+Beck	NULL	abc	123
+Beck	NULL	abc	123
+Cluck	NULL	abc	123
+Mary	NULL	abc	123
+Mary	NULL	abc	123
+Snow	NULL	abc	123
+Tom	NULL	abc	123
+Tom	NULL	abc	123
+Tom	NULL	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-Beck	0.0	__HIVE_DEFAULT_PARTITION__
-Beck	77.341	__HIVE_DEFAULT_PARTITION__
-Beck	79.9	__HIVE_DEFAULT_PARTITION__
-Beck	NULL	abc
-Beck	NULL	abc
-Beck	NULL	abc
-Cluck	5.96	__HIVE_DEFAULT_PARTITION__
-Cluck	NULL	abc
-Mary	33.33	__HIVE_DEFAULT_PARTITION__
-Mary	4.329	__HIVE_DEFAULT_PARTITION__
-Mary	NULL	abc
-Mary	NULL	abc
-Snow	55.71	__HIVE_DEFAULT_PARTITION__
-Snow	NULL	abc
-Tom	-12.25	__HIVE_DEFAULT_PARTITION__
-Tom	19.00	__HIVE_DEFAULT_PARTITION__
-Tom	234.79	__HIVE_DEFAULT_PARTITION__
-Tom	NULL	abc
-Tom	NULL	abc
-Tom	NULL	abc
+Beck	0.0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77.341	__HIVE_DEFAULT_PARTITION__	123
+Beck	79.9	__HIVE_DEFAULT_PARTITION__	123
+Cluck	5.96	__HIVE_DEFAULT_PARTITION__	123
+Mary	33.33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4.329	__HIVE_DEFAULT_PARTITION__	123
+Snow	55.71	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12.25	__HIVE_DEFAULT_PARTITION__	123
+Tom	19.00	__HIVE_DEFAULT_PARTITION__	123
+Tom	234.79	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: alter table alter_partition_change_col1 replace columns (c1 string)
 PREHOOK: type: ALTERTABLE_REPLACECOLS
 PREHOOK: Input: default@alter_partition_change_col1
@@ -415,43 +475,53 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	__HIVE_DEFAULT_PARTITION__
-Beck	__HIVE_DEFAULT_PARTITION__
-Beck	__HIVE_DEFAULT_PARTITION__
-Beck	abc
-Beck	abc
-Beck	abc
-Cluck	__HIVE_DEFAULT_PARTITION__
-Cluck	abc
-Mary	__HIVE_DEFAULT_PARTITION__
-Mary	__HIVE_DEFAULT_PARTITION__
-Mary	abc
-Mary	abc
-Snow	__HIVE_DEFAULT_PARTITION__
-Snow	abc
-Tom	__HIVE_DEFAULT_PARTITION__
-Tom	__HIVE_DEFAULT_PARTITION__
-Tom	__HIVE_DEFAULT_PARTITION__
-Tom	abc
-Tom	abc
-Tom	abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	abc	123
+Beck	abc	123
+Beck	abc	123
+Cluck	abc	123
+Mary	abc	123
+Mary	abc	123
+Snow	abc	123
+Tom	abc	123
+Tom	abc	123
+Tom	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	__HIVE_DEFAULT_PARTITION__	123
+Beck	__HIVE_DEFAULT_PARTITION__	123
+Beck	__HIVE_DEFAULT_PARTITION__	123
+Cluck	__HIVE_DEFAULT_PARTITION__	123
+Mary	__HIVE_DEFAULT_PARTITION__	123
+Mary	__HIVE_DEFAULT_PARTITION__	123
+Snow	__HIVE_DEFAULT_PARTITION__	123
+Tom	__HIVE_DEFAULT_PARTITION__	123
+Tom	__HIVE_DEFAULT_PARTITION__	123
+Tom	__HIVE_DEFAULT_PARTITION__	123
 PREHOOK: query: -- Try add columns
 alter table alter_partition_change_col1 add columns (c2 decimal(14,4))
 PREHOOK: type: ALTERTABLE_ADDCOLS
@@ -471,108 +541,216 @@ POSTHOOK: Input: default@alter_partition
 c1                  	string              	                    
 c2                  	decimal(14,4)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+p2                  	string              	                    
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	NULL	abc	123
+Beck	NULL	abc	123
+Beck	NULL	abc	123
+Cluck	NULL	abc	123
+Mary	NULL	abc	123
+Mary	NULL	abc	123
+Snow	NULL	abc	123
+Tom	NULL	abc	123
+Tom	NULL	abc	123
+Tom	NULL	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-Beck	0.0	__HIVE_DEFAULT_PARTITION__
-Beck	77.341	__HIVE_DEFAULT_PARTITION__
-Beck	79.9	__HIVE_DEFAULT_PARTITION__
-Beck	NULL	abc
-Beck	NULL	abc
-Beck	NULL	abc
-Cluck	5.96	__HIVE_DEFAULT_PARTITION__
-Cluck	NULL	abc
-Mary	33.33	__HIVE_DEFAULT_PARTITION__
-Mary	4.329	__HIVE_DEFAULT_PARTITION__
-Mary	NULL	abc
-Mary	NULL	abc
-Snow	55.71	__HIVE_DEFAULT_PARTITION__
-Snow	NULL	abc
-Tom	-12.25	__HIVE_DEFAULT_PARTITION__
-Tom	19.00	__HIVE_DEFAULT_PARTITION__
-Tom	234.79	__HIVE_DEFAULT_PARTITION__
-Tom	NULL	abc
-Tom	NULL	abc
-Tom	NULL	abc
-PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc') add columns (c2 decimal(14,4))
+Beck	0.0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77.341	__HIVE_DEFAULT_PARTITION__	123
+Beck	79.9	__HIVE_DEFAULT_PARTITION__	123
+Cluck	5.96	__HIVE_DEFAULT_PARTITION__	123
+Mary	33.33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4.329	__HIVE_DEFAULT_PARTITION__	123
+Snow	55.71	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12.25	__HIVE_DEFAULT_PARTITION__	123
+Tom	19.00	__HIVE_DEFAULT_PARTITION__	123
+Tom	234.79	__HIVE_DEFAULT_PARTITION__	123
+PREHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') add columns (c2 decimal(14,4))
 PREHOOK: type: ALTERTABLE_ADDCOLS
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Output: default@alter_partition_change_col1@p1=abc
-POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc') add columns (c2 decimal(14,4))
+PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: query: alter table alter_partition_change_col1 partition (p1='abc', p2='123') add columns (c2 decimal(14,4))
 POSTHOOK: type: ALTERTABLE_ADDCOLS
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-POSTHOOK: Output: default@alter_partition_change_col1@p1=abc
-PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc')
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
 POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@alter_partition_change_col1
 c1                  	string              	                    
 c2                  	decimal(14,4)       	                    
 p1                  	string              	                    
+p2                  	string              	                    
 	 	 
 # Partition Information	 	 
 # col_name            	data_type           	comment             
 	 	 
 p1                  	string              	                    
-PREHOOK: query: select * from alter_partition_change_col1
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0.0	abc	123
+Beck	77.341	abc	123
+Beck	79.9	abc	123
+Cluck	5.96	abc	123
+Mary	33.33	abc	123
+Mary	4.329	abc	123
+Snow	55.71	abc	123
+Tom	-12.25	abc	123
+Tom	19.00	abc	123
+Tom	234.79	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 PREHOOK: type: QUERY
 PREHOOK: Input: default@alter_partition_change_col1
-PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-PREHOOK: Input: default@alter_partition_change_col1@p1=abc
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
 #### A masked pattern was here ####
-POSTHOOK: query: select * from alter_partition_change_col1
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@alter_partition_change_col1
-POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__
-POSTHOOK: Input: default@alter_partition_change_col1@p1=abc
-#### A masked pattern was here ####
-Beck	0.0	__HIVE_DEFAULT_PARTITION__
-Beck	0.0	abc
-Beck	77.341	__HIVE_DEFAULT_PARTITION__
-Beck	77.341	abc
-Beck	79.9	__HIVE_DEFAULT_PARTITION__
-Beck	79.9	abc
-Cluck	5.96	__HIVE_DEFAULT_PARTITION__
-Cluck	5.96	abc
-Mary	33.33	__HIVE_DEFAULT_PARTITION__
-Mary	33.33	abc
-Mary	4.329	__HIVE_DEFAULT_PARTITION__
-Mary	4.329	abc
-Snow	55.71	__HIVE_DEFAULT_PARTITION__
-Snow	55.71	abc
-Tom	-12.25	__HIVE_DEFAULT_PARTITION__
-Tom	-12.25	abc
-Tom	19.00	__HIVE_DEFAULT_PARTITION__
-Tom	19.00	abc
-Tom	234.79	__HIVE_DEFAULT_PARTITION__
-Tom	234.79	abc
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0.0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77.341	__HIVE_DEFAULT_PARTITION__	123
+Beck	79.9	__HIVE_DEFAULT_PARTITION__	123
+Cluck	5.96	__HIVE_DEFAULT_PARTITION__	123
+Mary	33.33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4.329	__HIVE_DEFAULT_PARTITION__	123
+Snow	55.71	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12.25	__HIVE_DEFAULT_PARTITION__	123
+Tom	19.00	__HIVE_DEFAULT_PARTITION__	123
+Tom	234.79	__HIVE_DEFAULT_PARTITION__	123
+PREHOOK: query: -- Try changing column for all partitions at once
+alter table alter_partition_change_col1 partition (p1, p2='123') change column c2 c2 decimal(10,0)
+PREHOOK: type: ALTERTABLE_RENAMECOL
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+PREHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: query: -- Try changing column for all partitions at once
+alter table alter_partition_change_col1 partition (p1, p2='123') change column c2 c2 decimal(10,0)
+POSTHOOK: type: ALTERTABLE_RENAMECOL
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+POSTHOOK: Output: default@alter_partition_change_col1@p1=abc/p2=123
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='abc', p2='123')
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@alter_partition_change_col1
+c1                  	string              	                    
+c2                  	decimal(10,0)       	                    
+p1                  	string              	                    
+p2                  	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+p1                  	string              	                    
+p2                  	string              	                    
+PREHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123')
+PREHOOK: type: DESCTABLE
+PREHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: query: describe alter_partition_change_col1 partition (p1='__HIVE_DEFAULT_PARTITION__', p2='123')
+POSTHOOK: type: DESCTABLE
+POSTHOOK: Input: default@alter_partition_change_col1
+c1                  	string              	                    
+c2                  	decimal(10,0)       	                    
+p1                  	string              	                    
+p2                  	string              	                    
+	 	 
+# Partition Information	 	 
+# col_name            	data_type           	comment             
+	 	 
+p1                  	string              	                    
+p2                  	string              	                    
+PREHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='abc'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=abc/p2=123
+#### A masked pattern was here ####
+Beck	0	abc	123
+Beck	77	abc	123
+Beck	80	abc	123
+Cluck	6	abc	123
+Mary	33	abc	123
+Mary	4	abc	123
+Snow	56	abc	123
+Tom	-12	abc	123
+Tom	19	abc	123
+Tom	235	abc	123
+PREHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+PREHOOK: type: QUERY
+PREHOOK: Input: default@alter_partition_change_col1
+PREHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+POSTHOOK: query: select * from alter_partition_change_col1 where p1='__HIVE_DEFAULT_PARTITION__'
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@alter_partition_change_col1
+POSTHOOK: Input: default@alter_partition_change_col1@p1=__HIVE_DEFAULT_PARTITION__/p2=123
+#### A masked pattern was here ####
+Beck	0	__HIVE_DEFAULT_PARTITION__	123
+Beck	77	__HIVE_DEFAULT_PARTITION__	123
+Beck	80	__HIVE_DEFAULT_PARTITION__	123
+Cluck	6	__HIVE_DEFAULT_PARTITION__	123
+Mary	33	__HIVE_DEFAULT_PARTITION__	123
+Mary	4	__HIVE_DEFAULT_PARTITION__	123
+Snow	56	__HIVE_DEFAULT_PARTITION__	123
+Tom	-12	__HIVE_DEFAULT_PARTITION__	123
+Tom	19	__HIVE_DEFAULT_PARTITION__	123
+Tom	235	__HIVE_DEFAULT_PARTITION__	123



Mime
View raw message