hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmccl...@apache.org
Subject [4/4] hive git commit: HIVE-13648: ORC Schema Evolution doesn't support same type conversion for VARCHAR, CHAR, or DECIMAL when maxLength or precision/scale is different (Matt McCline, reviewed by Prasanth Jayachandran)
Date Fri, 17 Jun 2016 01:41:21 GMT
HIVE-13648: ORC Schema Evolution doesn't support same type conversion for VARCHAR, CHAR, or DECIMAL when maxLength or precision/scale is different (Matt McCline, reviewed by Prasanth Jayachandran)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/d6a89ad1
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/d6a89ad1
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/d6a89ad1

Branch: refs/heads/master
Commit: d6a89ad19972bdbc614dbd20d66c03714d17d99d
Parents: 7583e39
Author: Matt McCline <mmccline@hortonworks.com>
Authored: Thu Jun 16 18:41:01 2016 -0700
Committer: Matt McCline <mmccline@hortonworks.com>
Committed: Thu Jun 16 18:41:01 2016 -0700

----------------------------------------------------------------------
 data/files/same_type1_a.txt                     |   5 +
 data/files/same_type1_b.txt                     |   4 +
 data/files/same_type1_c.txt                     |   4 +
 .../orc/impl/ConvertTreeReaderFactory.java      |  79 ++++-
 .../org/apache/orc/impl/SchemaEvolution.java    |   6 +-
 .../org/apache/orc/impl/TreeReaderFactory.java  |   2 +-
 ...evol_orc_nonvec_mapwork_part_all_primitive.q |  45 +++
 ...ma_evol_orc_vec_mapwork_part_all_primitive.q |  45 +++
 ...vol_text_nonvec_mapwork_part_all_primitive.q |  48 ++-
 ...a_evol_text_vec_mapwork_part_all_primitive.q |  48 ++-
 ...vol_text_vecrow_mapwork_part_all_primitive.q |  48 ++-
 ..._orc_nonvec_mapwork_part_all_primitive.q.out | 271 +++++++++++++++
 ...vol_orc_vec_mapwork_part_all_primitive.q.out | 272 +++++++++++++++
 ...text_nonvec_mapwork_part_all_primitive.q.out | 343 ++++++++++++-------
 ...ol_text_vec_mapwork_part_all_primitive.q.out | 343 ++++++++++++-------
 ...text_vecrow_mapwork_part_all_primitive.q.out | 343 ++++++++++++-------
 ..._orc_nonvec_mapwork_part_all_primitive.q.out | 252 ++++++++++++++
 ...vol_orc_vec_mapwork_part_all_primitive.q.out | 252 ++++++++++++++
 ...text_nonvec_mapwork_part_all_primitive.q.out | 333 ++++++++++++------
 ...ol_text_vec_mapwork_part_all_primitive.q.out | 333 ++++++++++++------
 ...text_vecrow_mapwork_part_all_primitive.q.out | 333 ++++++++++++------
 21 files changed, 2641 insertions(+), 768 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/data/files/same_type1_a.txt
----------------------------------------------------------------------
diff --git a/data/files/same_type1_a.txt b/data/files/same_type1_a.txt
new file mode 100644
index 0000000..85758d7
--- /dev/null
+++ b/data/files/same_type1_a.txt
@@ -0,0 +1,5 @@
+1|excess|corporation believable|gateway |thumb repeat continuous|76855494.39|116074482533.2156|original
+2|mutation|hideout authentic    |blankness sonic disfigured     |hover knowing aged  |42093605|3182652.40668|original
+3|hibernation|country detox coyotes|ball pulse candle|direct|1413570.3|8.3095808155|original
+4|aquarium|encounter existent amuse  |fuse light headlock|bumper admission honorary|5475414.65|25937.675256300369991|original
+5|123456789012|1234567890123456789012345|1234567890123456789012345|1234567890|12345678.1234|1234567890.0987654321|original

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/data/files/same_type1_b.txt
----------------------------------------------------------------------
diff --git a/data/files/same_type1_b.txt b/data/files/same_type1_b.txt
new file mode 100644
index 0000000..7565ec4
--- /dev/null
+++ b/data/files/same_type1_b.txt
@@ -0,0 +1,4 @@
+6|hollow       |innocent crabs blushing|ambition ebony ambition|liquor ageless parasite fictional|279629518169.52368|3841833197.31413709|new
+7|wig feeling|social fork drum|search bump|conclusion perception|8.30958|8052953537267.278|new
+8|bubble first|drain loyal station|racket|antique business|0.6933|22.8326132787413|new
+9|12345678|12345678901234567890123456789012|123456789012345|123456789012345678|1234567890.12|1234567890.543210987654321|new

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/data/files/same_type1_c.txt
----------------------------------------------------------------------
diff --git a/data/files/same_type1_c.txt b/data/files/same_type1_c.txt
new file mode 100644
index 0000000..aac79e7
--- /dev/null
+++ b/data/files/same_type1_c.txt
@@ -0,0 +1,4 @@
+10|dreamland cough|raster  devastation      |association boarder fallout|lubricant century|5830.9867195262469749|06439940618207.90208806095117224262|new
+11|tiger        |however center|propeller agonizing|shocking misshapen detachable painless|6946533.80265655352968056575|31608910.03|new
+12|  bulging    |extensive  ambivalent|rastled|billion zeroes|943084.3|3090297719.71712034932827109|new
+13|12345678|12345678901234567890123456789012|123456789012345|123456789012345678|1234567890.12|1234567890.543210987654321|new

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/orc/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java
----------------------------------------------------------------------
diff --git a/orc/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java b/orc/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java
index 3ba56f7..5b830c3 100644
--- a/orc/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java
+++ b/orc/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java
@@ -259,7 +259,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
           bytesColVector.vector[elementNum],
           bytesColVector.start[elementNum], bytesColVector.length[elementNum],
           StandardCharsets.UTF_8);
- 
+
       return string;
     }
 
@@ -1316,6 +1316,61 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
     }
   }
 
+  public static class DecimalFromDecimalTreeReader extends ConvertTreeReader {
+
+    private DecimalTreeReader decimalTreeReader;
+
+    private final TypeDescription fileType;
+    private final TypeDescription readerType;
+    private DecimalColumnVector fileDecimalColVector;
+    private int filePrecision;
+    private int fileScale;
+    private int readerPrecision;
+    private int readerScale;
+    private DecimalColumnVector decimalColVector;
+
+    DecimalFromDecimalTreeReader(int columnId, TypeDescription fileType, TypeDescription readerType)
+        throws IOException {
+      super(columnId);
+      this.fileType = fileType;
+      filePrecision = fileType.getPrecision();
+      fileScale = fileType.getScale();
+      this.readerType = readerType;
+      readerPrecision = readerType.getPrecision();
+      readerScale = readerType.getScale();
+      decimalTreeReader = new DecimalTreeReader(columnId, filePrecision, fileScale);
+      setConvertTreeReader(decimalTreeReader);
+    }
+
+    @Override
+    public void setConvertVectorElement(int elementNum) throws IOException {
+
+      HiveDecimalWritable valueWritable = HiveDecimalWritable.enforcePrecisionScale(
+          fileDecimalColVector.vector[elementNum], readerPrecision, readerScale);
+      if (valueWritable != null) {
+        decimalColVector.set(elementNum, valueWritable);
+      } else {
+        decimalColVector.noNulls = false;
+        decimalColVector.isNull[elementNum] = true;
+      }
+    }
+
+    @Override
+    public void nextVector(ColumnVector previousVector,
+                           boolean[] isNull,
+                           final int batchSize) throws IOException {
+      if (fileDecimalColVector == null) {
+        // Allocate column vector for file; cast column vector for reader.
+        fileDecimalColVector = new DecimalColumnVector(filePrecision, fileScale);
+        decimalColVector = (DecimalColumnVector) previousVector;
+      }
+      // Read present/isNull stream
+      decimalTreeReader.nextVector(fileDecimalColVector, isNull, batchSize);
+
+      convertVector(fileDecimalColVector, decimalColVector, batchSize);
+    }
+  }
+
   public static class StringGroupFromAnyIntegerTreeReader extends ConvertTreeReader {
 
     private AnyIntegerTreeReader anyIntegerAsLongTreeReader;
@@ -2219,7 +2274,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
       return new TimestampFromDecimalTreeReader(columnId, fileType, skipCorrupt);
 
     case DECIMAL:
-      // UNDONE: Decimal to Decimal conversion????
+      return new DecimalFromDecimalTreeReader(columnId, fileType, readerType);
 
     // Not currently supported conversion(s):
     case BINARY:
@@ -2325,8 +2380,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
       return new StringGroupFromStringGroupTreeReader(columnId, fileType, readerType);
 
     case CHAR:
-      throw new IllegalArgumentException("No conversion of type " +
-          readerType.getCategory() + " to self needed");
+      return new StringGroupFromStringGroupTreeReader(columnId, fileType, readerType);
 
     case BINARY:
       return new BinaryFromStringGroupTreeReader(columnId, fileType);
@@ -2382,8 +2436,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
       return new StringGroupFromStringGroupTreeReader(columnId, fileType, readerType);
 
     case VARCHAR:
-      throw new IllegalArgumentException("No conversion of type " +
-          readerType.getCategory() + " to self needed");
+      return new StringGroupFromStringGroupTreeReader(columnId, fileType, readerType);
 
     case BINARY:
       return new BinaryFromStringGroupTreeReader(columnId, fileType);
@@ -2599,11 +2652,11 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
    *   StringGroupFromFloatTreeReader (written)
    *   StringGroupFromDoubleTreeReader (written)
    *   StringGroupFromDecimalTreeReader (written)
-   *  
+   *
    *   String from Char/Varchar conversion
    *   Char from String/Varchar conversion
    *   Varchar from String/Char conversion
-   *  
+   *
    *   StringGroupFromTimestampTreeReader (written)
    *   StringGroupFromDateTreeReader (written)
    *   StringGroupFromBinaryTreeReader *****
@@ -2621,7 +2674,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
    *   TimestampFromDecimalTreeeReader (written)
    *   TimestampFromStringGroupTreeReader (written)
    *   TimestampFromDateTreeReader
-   * 
+   *
    *
    * To DATE:
    *   Convert from (STRING, CHAR, VARCHAR) using string conversion.
@@ -2751,7 +2804,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
       // Fall through.
     }
 
-    // Now look for the few cases we don't convert from 
+    // Now look for the few cases we don't convert from
     switch (fileType.getCategory()) {
 
     case BOOLEAN:
@@ -2770,8 +2823,8 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
       default:
         return true;
       }
-   
-    
+
+
     case STRING:
     case CHAR:
     case VARCHAR:
@@ -2807,7 +2860,7 @@ public class ConvertTreeReaderFactory extends TreeReaderFactory {
       default:
         return true;
       }
-    
+
     case BINARY:
       switch (readerType.getCategory()) {
       // Not currently supported conversion(s):

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/orc/src/java/org/apache/orc/impl/SchemaEvolution.java
----------------------------------------------------------------------
diff --git a/orc/src/java/org/apache/orc/impl/SchemaEvolution.java b/orc/src/java/org/apache/orc/impl/SchemaEvolution.java
index 2c80aaa..a6c1d60 100644
--- a/orc/src/java/org/apache/orc/impl/SchemaEvolution.java
+++ b/orc/src/java/org/apache/orc/impl/SchemaEvolution.java
@@ -100,12 +100,10 @@ public class SchemaEvolution {
           break;
         case CHAR:
         case VARCHAR:
-          // HIVE-13648: Look at ORC data type conversion edge cases (CHAR, VARCHAR, DECIMAL)
-          isOk = fileType.getMaxLength() == readerType.getMaxLength();
+          // We do conversion when same CHAR/VARCHAR type but different maxLength.
           break;
         case DECIMAL:
-          // HIVE-13648: Look at ORC data type conversion edge cases (CHAR, VARCHAR, DECIMAL)
-          // TODO we don't enforce scale and precision checks, but probably should
+          // We do conversion when same DECIMAL type but different precision/scale.
           break;
         case UNION:
         case MAP:

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java
----------------------------------------------------------------------
diff --git a/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java b/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java
index 6c8ecfd..5901c8c 100644
--- a/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java
+++ b/orc/src/java/org/apache/orc/impl/TreeReaderFactory.java
@@ -2034,7 +2034,7 @@ public class TreeReaderFactory {
       return new NullTreeReader(0);
     }
     TypeDescription.Category readerTypeCategory = readerType.getCategory();
-    if (!fileType.getCategory().equals(readerTypeCategory) &&
+    if (!fileType.equals(readerType) &&
         (readerTypeCategory != TypeDescription.Category.STRUCT &&
          readerTypeCategory != TypeDescription.Category.MAP &&
          readerTypeCategory != TypeDescription.Category.LIST &&

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/queries/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q b/ql/src/test/queries/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q
index 2d49d7b..f8aebc8 100644
--- a/ql/src/test/queries/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q
+++ b/ql/src/test/queries/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q
@@ -479,3 +479,48 @@ select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order
 select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order by insert_num;
 
 drop table part_change_various_various_date;
+
+
+--
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
+--
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT);
+
+CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt;
+
+select * from same_type1_a_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
+
+-- Table-Non-Cascade CHANGE COLUMNS ...
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING);
+
+CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt;
+
+select * from same_type1_b_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt;
+
+CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt;
+
+select * from same_type1_c_txt;
+
+insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt;
+
+explain
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
+
+drop table part_change_same_type_different_params;

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/queries/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q b/ql/src/test/queries/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q
index c7f2f57..aef6744 100644
--- a/ql/src/test/queries/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q
+++ b/ql/src/test/queries/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q
@@ -479,3 +479,48 @@ select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order
 select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order by insert_num;
 
 drop table part_change_various_various_date;
+
+
+--
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
+--
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT);
+
+CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt;
+
+select * from same_type1_a_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
+
+-- Table-Non-Cascade CHANGE COLUMNS ...
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING);
+
+CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt;
+
+select * from same_type1_b_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt;
+
+CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt;
+
+select * from same_type1_c_txt;
+
+insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt;
+
+explain
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
+
+drop table part_change_same_type_different_params;

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/queries/clientpositive/schema_evol_text_nonvec_mapwork_part_all_primitive.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/schema_evol_text_nonvec_mapwork_part_all_primitive.q b/ql/src/test/queries/clientpositive/schema_evol_text_nonvec_mapwork_part_all_primitive.q
index 7ea38ea..975a0dd 100644
--- a/ql/src/test/queries/clientpositive/schema_evol_text_nonvec_mapwork_part_all_primitive.q
+++ b/ql/src/test/queries/clientpositive/schema_evol_text_nonvec_mapwork_part_all_primitive.q
@@ -481,32 +481,46 @@ select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order
 drop table part_change_various_various_date;
 
 
-
 --
--- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Various --> Various: (STRING, CHAR, VARCHAR) --> BINARY
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
 --
-CREATE TABLE part_change_various_various_binary(insert_num int, c1 STRING, c2 CHAR(25), c3 VARCHAR(25), b STRING) PARTITIONED BY(part INT);
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT);
+
+CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt;
 
-insert into table part_change_various_various_binary partition(part=1)
-    values(1, 'binary', 'binary',  'binary', 'original'),
-          (2, 'binary', 'binary',  'binary', 'original'),
-          (3, 'binary', 'binary',  'binary', 'original'),
-          (4, 'binary', 'binary',  'binary', 'original');
+select * from same_type1_a_txt;
 
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
 -- Table-Non-Cascade CHANGE COLUMNS ...
-alter table part_change_various_various_binary replace columns (insert_num int, c1 BINARY, c2 BINARY, c3 BINARY, b STRING);
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING);
+
+CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt;
+
+select * from same_type1_b_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt;
+
+CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt;
 
-insert into table part_change_various_various_binary partition(part=2)
-    values (5, 'binary', 'binary', 'binary', 'new');
+select * from same_type1_c_txt;
 
-insert into table part_change_various_various_binary partition(part=1)
-    values (6,-'binary', 'binary', 'binary', 'new');
+insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt;
 
 explain
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
-drop table part_change_various_various_binary;
+drop table part_change_same_type_different_params;

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/queries/clientpositive/schema_evol_text_vec_mapwork_part_all_primitive.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/schema_evol_text_vec_mapwork_part_all_primitive.q b/ql/src/test/queries/clientpositive/schema_evol_text_vec_mapwork_part_all_primitive.q
index fd0b634..9f1cfe6 100644
--- a/ql/src/test/queries/clientpositive/schema_evol_text_vec_mapwork_part_all_primitive.q
+++ b/ql/src/test/queries/clientpositive/schema_evol_text_vec_mapwork_part_all_primitive.q
@@ -483,32 +483,46 @@ select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order
 drop table part_change_various_various_date;
 
 
-
 --
--- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Various --> Various: (STRING, CHAR, VARCHAR) --> BINARY
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
 --
-CREATE TABLE part_change_various_various_binary(insert_num int, c1 STRING, c2 CHAR(25), c3 VARCHAR(25), b STRING) PARTITIONED BY(part INT);
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT);
+
+CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt;
 
-insert into table part_change_various_various_binary partition(part=1)
-    values(1, 'binary', 'binary',  'binary', 'original'),
-          (2, 'binary', 'binary',  'binary', 'original'),
-          (3, 'binary', 'binary',  'binary', 'original'),
-          (4, 'binary', 'binary',  'binary', 'original');
+select * from same_type1_a_txt;
 
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
 -- Table-Non-Cascade CHANGE COLUMNS ...
-alter table part_change_various_various_binary replace columns (insert_num int, c1 BINARY, c2 BINARY, c3 BINARY, b STRING);
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING);
+
+CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt;
+
+select * from same_type1_b_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt;
+
+CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt;
 
-insert into table part_change_various_various_binary partition(part=2)
-    values (5, 'binary', 'binary', 'binary', 'new');
+select * from same_type1_c_txt;
 
-insert into table part_change_various_various_binary partition(part=1)
-    values (6,-'binary', 'binary', 'binary', 'new');
+insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt;
 
 explain
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
-drop table part_change_various_various_binary;
+drop table part_change_same_type_different_params;

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/queries/clientpositive/schema_evol_text_vecrow_mapwork_part_all_primitive.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/schema_evol_text_vecrow_mapwork_part_all_primitive.q b/ql/src/test/queries/clientpositive/schema_evol_text_vecrow_mapwork_part_all_primitive.q
index 09e544a..00b68ad 100644
--- a/ql/src/test/queries/clientpositive/schema_evol_text_vecrow_mapwork_part_all_primitive.q
+++ b/ql/src/test/queries/clientpositive/schema_evol_text_vecrow_mapwork_part_all_primitive.q
@@ -483,32 +483,46 @@ select insert_num,part,c1,c2,c3,c4,b from part_change_various_various_date order
 drop table part_change_various_various_date;
 
 
-
 --
--- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Various --> Various: (STRING, CHAR, VARCHAR) --> BINARY
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
 --
-CREATE TABLE part_change_various_various_binary(insert_num int, c1 STRING, c2 CHAR(25), c3 VARCHAR(25), b STRING) PARTITIONED BY(part INT);
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT);
+
+CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt;
 
-insert into table part_change_various_various_binary partition(part=1)
-    values(1, 'binary', 'binary',  'binary', 'original'),
-          (2, 'binary', 'binary',  'binary', 'original'),
-          (3, 'binary', 'binary',  'binary', 'original'),
-          (4, 'binary', 'binary',  'binary', 'original');
+select * from same_type1_a_txt;
 
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt;
+
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
 -- Table-Non-Cascade CHANGE COLUMNS ...
-alter table part_change_various_various_binary replace columns (insert_num int, c1 BINARY, c2 BINARY, c3 BINARY, b STRING);
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING);
+
+CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt;
+
+select * from same_type1_b_txt;
+
+insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt;
+
+CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile;
+load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt;
 
-insert into table part_change_various_various_binary partition(part=2)
-    values (5, 'binary', 'binary', 'binary', 'new');
+select * from same_type1_c_txt;
 
-insert into table part_change_various_various_binary partition(part=1)
-    values (6,-'binary', 'binary', 'binary', 'new');
+insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt;
 
 explain
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
-select insert_num,part,c1,c2,c3,b from part_change_various_various_binary order by insert_num;
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num;
 
-drop table part_change_various_various_binary;
+drop table part_change_same_type_different_params;

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/results/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q.out b/ql/src/test/results/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q.out
index b0874ad..0ac57b3 100644
--- a/ql/src/test/results/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q.out
+++ b/ql/src/test/results/clientpositive/schema_evol_orc_nonvec_mapwork_part_all_primitive.q.out
@@ -2870,3 +2870,274 @@ POSTHOOK: query: drop table part_change_various_various_date
 POSTHOOK: type: DROPTABLE
 POSTHOOK: Input: default@part_change_various_various_date
 POSTHOOK: Output: default@part_change_various_various_date
+PREHOOK: query: --
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
+--
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@part_change_same_type_different_params
+POSTHOOK: query: --
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
+--
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@part_change_same_type_different_params
+PREHOOK: query: CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@same_type1_a_txt
+POSTHOOK: query: CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@same_type1_a_txt
+PREHOOK: query: load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@same_type1_a_txt
+POSTHOOK: query: load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@same_type1_a_txt
+PREHOOK: query: select * from same_type1_a_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_a_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from same_type1_a_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_a_txt
+#### A masked pattern was here ####
+same_type1_a_txt.insert_num	same_type1_a_txt.c1	same_type1_a_txt.c2	same_type1_a_txt.c3	same_type1_a_txt.c4	same_type1_a_txt.c5	same_type1_a_txt.c6	same_type1_a_txt.b
+1	excess      	corporation believable   	gateway 	thumb repe	76855494.3900	NULL	original
+2	mutation    	hideout authentic        	blankness sonic disfigure	hover know	42093605.0000	3182652.4066800000	original
+3	hibernation 	country detox coyotes    	ball pulse candle	direct	1413570.3000	8.3095808155	original
+4	aquarium    	encounter existent amuse 	fuse light headlock	bumper adm	5475414.6500	25937.6752563004	original
+5	123456789012	1234567890123456789012345	1234567890123456789012345	1234567890	12345678.1234	1234567890.0987654321	original
+PREHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_a_txt
+PREHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_a_txt
+POSTHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).b SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:b, type:string, comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c1 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c1, type:char(12), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c2 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c2, type:char(25), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c3 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c3, type:varchar(25), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c4 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c4, type:varchar(10), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c5 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c5, type:decimal(12,4), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c6 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c6, type:decimal(20,10), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).insert_num SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:insert_num, type:int, comment:null), ]
+same_type1_a_txt.insert_num	same_type1_a_txt.c1	same_type1_a_txt.c2	same_type1_a_txt.c3	same_type1_a_txt.c4	same_type1_a_txt.c5	same_type1_a_txt.c6	same_type1_a_txt.b
+PREHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+PREHOOK: type: QUERY
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Input: default@part_change_same_type_different_params@part=1
+#### A masked pattern was here ####
+POSTHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Input: default@part_change_same_type_different_params@part=1
+#### A masked pattern was here ####
+insert_num	part	c1	c2	c3	c4	c5	c6	b
+1	1	excess      	corporation believable   	gateway 	thumb repe	76855494.3900	NULL	original
+2	1	mutation    	hideout authentic        	blankness sonic disfigure	hover know	42093605.0000	3182652.4066800000	original
+3	1	hibernation 	country detox coyotes    	ball pulse candle	direct	1413570.3000	8.3095808155	original
+4	1	aquarium    	encounter existent amuse 	fuse light headlock	bumper adm	5475414.6500	25937.6752563004	original
+5	1	123456789012	1234567890123456789012345	1234567890123456789012345	1234567890	12345678.1234	1234567890.0987654321	original
+PREHOOK: query: -- Table-Non-Cascade CHANGE COLUMNS ...
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Output: default@part_change_same_type_different_params
+POSTHOOK: query: -- Table-Non-Cascade CHANGE COLUMNS ...
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Output: default@part_change_same_type_different_params
+PREHOOK: query: CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@same_type1_b_txt
+POSTHOOK: query: CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@same_type1_b_txt
+PREHOOK: query: load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@same_type1_b_txt
+POSTHOOK: query: load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@same_type1_b_txt
+PREHOOK: query: select * from same_type1_b_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_b_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from same_type1_b_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_b_txt
+#### A masked pattern was here ####
+same_type1_b_txt.insert_num	same_type1_b_txt.c1	same_type1_b_txt.c2	same_type1_b_txt.c3	same_type1_b_txt.c4	same_type1_b_txt.c5	same_type1_b_txt.c6	same_type1_b_txt.b
+6	hollow  	innocent crabs blushing         	ambition ebony 	liquor ageless par	NULL	3841833197.314137090000000	new
+7	wig feel	social fork drum                	search bump	conclusion percept	8.31	NULL	new
+8	bubble f	drain loyal station             	racket	antique business	0.69	22.832613278741300	new
+9	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+PREHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_b_txt
+PREHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_b_txt
+POSTHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).b SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:b, type:string, comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c1 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c1, type:char(8), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c2 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c2, type:char(32), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c3 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c3, type:varchar(15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c4 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c4, type:varchar(18), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c5 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c5, type:decimal(10,2), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c6 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c6, type:decimal(25,15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).insert_num SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:insert_num, type:int, comment:null), ]
+same_type1_b_txt.insert_num	same_type1_b_txt.c1	same_type1_b_txt.c2	same_type1_b_txt.c3	same_type1_b_txt.c4	same_type1_b_txt.c5	same_type1_b_txt.c6	same_type1_b_txt.b
+PREHOOK: query: CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@same_type1_c_txt
+POSTHOOK: query: CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@same_type1_c_txt
+PREHOOK: query: load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@same_type1_c_txt
+POSTHOOK: query: load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@same_type1_c_txt
+PREHOOK: query: select * from same_type1_c_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_c_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from same_type1_c_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_c_txt
+#### A masked pattern was here ####
+same_type1_c_txt.insert_num	same_type1_c_txt.c1	same_type1_c_txt.c2	same_type1_c_txt.c3	same_type1_c_txt.c4	same_type1_c_txt.c5	same_type1_c_txt.c6	same_type1_c_txt.b
+10	dreamlan	raster  devastation             	association boa	lubricant century	5830.99	NULL	new
+11	tiger   	however center                  	propeller agoni	shocking misshapen	6946533.80	31608910.030000000000000	new
+12	  bulgin	extensive  ambivalent           	rastled	billion zeroes	943084.30	3090297719.717120349328271	new
+13	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+PREHOOK: query: insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_c_txt
+PREHOOK: Output: default@part_change_same_type_different_params@part=2
+POSTHOOK: query: insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_c_txt
+POSTHOOK: Output: default@part_change_same_type_different_params@part=2
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).b SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:b, type:string, comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c1 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c1, type:char(8), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c2 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c2, type:char(32), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c3 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c3, type:varchar(15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c4 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c4, type:varchar(18), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c5 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c5, type:decimal(10,2), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c6 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c6, type:decimal(25,15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).insert_num SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:insert_num, type:int, comment:null), ]
+same_type1_c_txt.insert_num	same_type1_c_txt.c1	same_type1_c_txt.c2	same_type1_c_txt.c3	same_type1_c_txt.c4	same_type1_c_txt.c5	same_type1_c_txt.c6	same_type1_c_txt.b
+PREHOOK: query: explain
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+POSTHOOK: type: QUERY
+Explain
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: part_change_same_type_different_params
+            Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+            Select Operator
+              expressions: insert_num (type: int), part (type: int), c1 (type: char(8)), c2 (type: char(32)), c3 (type: varchar(15)), c4 (type: varchar(18)), c5 (type: decimal(10,2)), c6 (type: decimal(25,15)), b (type: string)
+              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
+              Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+              Reduce Output Operator
+                key expressions: _col0 (type: int)
+                sort order: +
+                Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+                value expressions: _col1 (type: int), _col2 (type: char(8)), _col3 (type: char(32)), _col4 (type: varchar(15)), _col5 (type: varchar(18)), _col6 (type: decimal(10,2)), _col7 (type: decimal(25,15)), _col8 (type: string)
+      Reduce Operator Tree:
+        Select Operator
+          expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: int), VALUE._col1 (type: char(8)), VALUE._col2 (type: char(32)), VALUE._col3 (type: varchar(15)), VALUE._col4 (type: varchar(18)), VALUE._col5 (type: decimal(10,2)), VALUE._col6 (type: decimal(25,15)), VALUE._col7 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
+          Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+PREHOOK: type: QUERY
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Input: default@part_change_same_type_different_params@part=1
+PREHOOK: Input: default@part_change_same_type_different_params@part=2
+#### A masked pattern was here ####
+POSTHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Input: default@part_change_same_type_different_params@part=1
+POSTHOOK: Input: default@part_change_same_type_different_params@part=2
+#### A masked pattern was here ####
+insert_num	part	c1	c2	c3	c4	c5	c6	b
+1	1	excess  	corporation believable          	gateway 	thumb repe	76855494.39	NULL	original
+10	2	dreamlan	raster  devastation             	association boa	lubricant century	5830.99	NULL	new
+11	2	tiger   	however center                  	propeller agoni	shocking misshapen	6946533.80	31608910.030000000000000	new
+12	2	  bulgin	extensive  ambivalent           	rastled	billion zeroes	943084.30	3090297719.717120349328271	new
+13	2	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+2	1	mutation	hideout authentic               	blankness sonic	hover know	42093605.00	3182652.406680000000000	original
+3	1	hibernat	country detox coyotes           	ball pulse cand	direct	1413570.30	8.309580815500000	original
+4	1	aquarium	encounter existent amuse        	fuse light head	bumper adm	5475414.65	25937.675256300400000	original
+5	1	12345678	1234567890123456789012345       	123456789012345	1234567890	12345678.12	1234567890.098765432100000	original
+6	1	hollow  	innocent crabs blushing         	ambition ebony 	liquor ageless par	NULL	3841833197.314137090000000	new
+7	1	wig feel	social fork drum                	search bump	conclusion percept	8.31	NULL	new
+8	1	bubble f	drain loyal station             	racket	antique business	0.69	22.832613278741300	new
+9	1	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+PREHOOK: query: drop table part_change_same_type_different_params
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Output: default@part_change_same_type_different_params
+POSTHOOK: query: drop table part_change_same_type_different_params
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Output: default@part_change_same_type_different_params

http://git-wip-us.apache.org/repos/asf/hive/blob/d6a89ad1/ql/src/test/results/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q.out b/ql/src/test/results/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q.out
index e29b357..ad1f101 100644
--- a/ql/src/test/results/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q.out
+++ b/ql/src/test/results/clientpositive/schema_evol_orc_vec_mapwork_part_all_primitive.q.out
@@ -2885,3 +2885,275 @@ POSTHOOK: query: drop table part_change_various_various_date
 POSTHOOK: type: DROPTABLE
 POSTHOOK: Input: default@part_change_various_various_date
 POSTHOOK: Output: default@part_change_various_various_date
+PREHOOK: query: --
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
+--
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@part_change_same_type_different_params
+POSTHOOK: query: --
+-- SUBSECTION: ALTER TABLE CHANGE COLUMNS for Same Type (CHAR, VARCHAR, DECIMAL) --> Different maxLength or precision/scale
+--
+CREATE TABLE part_change_same_type_different_params(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING) PARTITIONED BY(part INT)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@part_change_same_type_different_params
+PREHOOK: query: CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@same_type1_a_txt
+POSTHOOK: query: CREATE TABLE same_type1_a_txt(insert_num int, c1 CHAR(12), c2 CHAR(25), c3 VARCHAR(25), c4 VARCHAR(10), c5 DECIMAL(12,4), c6 DECIMAL(20,10), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@same_type1_a_txt
+PREHOOK: query: load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@same_type1_a_txt
+POSTHOOK: query: load data local inpath '../../data/files/same_type1_a.txt' overwrite into table same_type1_a_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@same_type1_a_txt
+PREHOOK: query: select * from same_type1_a_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_a_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from same_type1_a_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_a_txt
+#### A masked pattern was here ####
+same_type1_a_txt.insert_num	same_type1_a_txt.c1	same_type1_a_txt.c2	same_type1_a_txt.c3	same_type1_a_txt.c4	same_type1_a_txt.c5	same_type1_a_txt.c6	same_type1_a_txt.b
+1	excess      	corporation believable   	gateway 	thumb repe	76855494.3900	NULL	original
+2	mutation    	hideout authentic        	blankness sonic disfigure	hover know	42093605.0000	3182652.4066800000	original
+3	hibernation 	country detox coyotes    	ball pulse candle	direct	1413570.3000	8.3095808155	original
+4	aquarium    	encounter existent amuse 	fuse light headlock	bumper adm	5475414.6500	25937.6752563004	original
+5	123456789012	1234567890123456789012345	1234567890123456789012345	1234567890	12345678.1234	1234567890.0987654321	original
+PREHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_a_txt
+PREHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_a_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_a_txt
+POSTHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).b SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:b, type:string, comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c1 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c1, type:char(12), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c2 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c2, type:char(25), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c3 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c3, type:varchar(25), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c4 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c4, type:varchar(10), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c5 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c5, type:decimal(12,4), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c6 SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:c6, type:decimal(20,10), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).insert_num SIMPLE [(same_type1_a_txt)same_type1_a_txt.FieldSchema(name:insert_num, type:int, comment:null), ]
+same_type1_a_txt.insert_num	same_type1_a_txt.c1	same_type1_a_txt.c2	same_type1_a_txt.c3	same_type1_a_txt.c4	same_type1_a_txt.c5	same_type1_a_txt.c6	same_type1_a_txt.b
+PREHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+PREHOOK: type: QUERY
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Input: default@part_change_same_type_different_params@part=1
+#### A masked pattern was here ####
+POSTHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Input: default@part_change_same_type_different_params@part=1
+#### A masked pattern was here ####
+insert_num	part	c1	c2	c3	c4	c5	c6	b
+1	1	excess      	corporation believable   	gateway 	thumb repe	76855494.3900	NULL	original
+2	1	mutation    	hideout authentic        	blankness sonic disfigure	hover know	42093605.0000	3182652.4066800000	original
+3	1	hibernation 	country detox coyotes    	ball pulse candle	direct	1413570.3000	8.3095808155	original
+4	1	aquarium    	encounter existent amuse 	fuse light headlock	bumper adm	5475414.6500	25937.6752563004	original
+5	1	123456789012	1234567890123456789012345	1234567890123456789012345	1234567890	12345678.1234	1234567890.0987654321	original
+PREHOOK: query: -- Table-Non-Cascade CHANGE COLUMNS ...
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Output: default@part_change_same_type_different_params
+POSTHOOK: query: -- Table-Non-Cascade CHANGE COLUMNS ...
+alter table part_change_same_type_different_params replace columns (insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Output: default@part_change_same_type_different_params
+PREHOOK: query: CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@same_type1_b_txt
+POSTHOOK: query: CREATE TABLE same_type1_b_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@same_type1_b_txt
+PREHOOK: query: load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@same_type1_b_txt
+POSTHOOK: query: load data local inpath '../../data/files/same_type1_b.txt' overwrite into table same_type1_b_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@same_type1_b_txt
+PREHOOK: query: select * from same_type1_b_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_b_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from same_type1_b_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_b_txt
+#### A masked pattern was here ####
+same_type1_b_txt.insert_num	same_type1_b_txt.c1	same_type1_b_txt.c2	same_type1_b_txt.c3	same_type1_b_txt.c4	same_type1_b_txt.c5	same_type1_b_txt.c6	same_type1_b_txt.b
+6	hollow  	innocent crabs blushing         	ambition ebony 	liquor ageless par	NULL	3841833197.314137090000000	new
+7	wig feel	social fork drum                	search bump	conclusion percept	8.31	NULL	new
+8	bubble f	drain loyal station             	racket	antique business	0.69	22.832613278741300	new
+9	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+PREHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_b_txt
+PREHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: query: insert into table part_change_same_type_different_params partition(part=1) select * from same_type1_b_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_b_txt
+POSTHOOK: Output: default@part_change_same_type_different_params@part=1
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).b SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:b, type:string, comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c1 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c1, type:char(8), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c2 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c2, type:char(32), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c3 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c3, type:varchar(15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c4 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c4, type:varchar(18), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c5 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c5, type:decimal(10,2), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).c6 SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:c6, type:decimal(25,15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=1).insert_num SIMPLE [(same_type1_b_txt)same_type1_b_txt.FieldSchema(name:insert_num, type:int, comment:null), ]
+same_type1_b_txt.insert_num	same_type1_b_txt.c1	same_type1_b_txt.c2	same_type1_b_txt.c3	same_type1_b_txt.c4	same_type1_b_txt.c5	same_type1_b_txt.c6	same_type1_b_txt.b
+PREHOOK: query: CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@same_type1_c_txt
+POSTHOOK: query: CREATE TABLE same_type1_c_txt(insert_num int, c1 CHAR(8), c2 CHAR(32), c3 VARCHAR(15), c4 VARCHAR(18), c5 DECIMAL(10,2), c6 DECIMAL(25,15), b STRING)
+row format delimited fields terminated by '|'
+stored as textfile
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@same_type1_c_txt
+PREHOOK: query: load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt
+PREHOOK: type: LOAD
+#### A masked pattern was here ####
+PREHOOK: Output: default@same_type1_c_txt
+POSTHOOK: query: load data local inpath '../../data/files/same_type1_c.txt' overwrite into table same_type1_c_txt
+POSTHOOK: type: LOAD
+#### A masked pattern was here ####
+POSTHOOK: Output: default@same_type1_c_txt
+PREHOOK: query: select * from same_type1_c_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_c_txt
+#### A masked pattern was here ####
+POSTHOOK: query: select * from same_type1_c_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_c_txt
+#### A masked pattern was here ####
+same_type1_c_txt.insert_num	same_type1_c_txt.c1	same_type1_c_txt.c2	same_type1_c_txt.c3	same_type1_c_txt.c4	same_type1_c_txt.c5	same_type1_c_txt.c6	same_type1_c_txt.b
+10	dreamlan	raster  devastation             	association boa	lubricant century	5830.99	NULL	new
+11	tiger   	however center                  	propeller agoni	shocking misshapen	6946533.80	31608910.030000000000000	new
+12	  bulgin	extensive  ambivalent           	rastled	billion zeroes	943084.30	3090297719.717120349328271	new
+13	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+PREHOOK: query: insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt
+PREHOOK: type: QUERY
+PREHOOK: Input: default@same_type1_c_txt
+PREHOOK: Output: default@part_change_same_type_different_params@part=2
+POSTHOOK: query: insert into table part_change_same_type_different_params partition(part=2) select * from same_type1_c_txt
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@same_type1_c_txt
+POSTHOOK: Output: default@part_change_same_type_different_params@part=2
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).b SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:b, type:string, comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c1 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c1, type:char(8), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c2 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c2, type:char(32), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c3 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c3, type:varchar(15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c4 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c4, type:varchar(18), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c5 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c5, type:decimal(10,2), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).c6 SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:c6, type:decimal(25,15), comment:null), ]
+POSTHOOK: Lineage: part_change_same_type_different_params PARTITION(part=2).insert_num SIMPLE [(same_type1_c_txt)same_type1_c_txt.FieldSchema(name:insert_num, type:int, comment:null), ]
+same_type1_c_txt.insert_num	same_type1_c_txt.c1	same_type1_c_txt.c2	same_type1_c_txt.c3	same_type1_c_txt.c4	same_type1_c_txt.c5	same_type1_c_txt.c6	same_type1_c_txt.b
+PREHOOK: query: explain
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+PREHOOK: type: QUERY
+POSTHOOK: query: explain
+select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+POSTHOOK: type: QUERY
+Explain
+STAGE DEPENDENCIES:
+  Stage-1 is a root stage
+  Stage-0 depends on stages: Stage-1
+
+STAGE PLANS:
+  Stage: Stage-1
+    Map Reduce
+      Map Operator Tree:
+          TableScan
+            alias: part_change_same_type_different_params
+            Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+            Select Operator
+              expressions: insert_num (type: int), part (type: int), c1 (type: char(8)), c2 (type: char(32)), c3 (type: varchar(15)), c4 (type: varchar(18)), c5 (type: decimal(10,2)), c6 (type: decimal(25,15)), b (type: string)
+              outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
+              Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+              Reduce Output Operator
+                key expressions: _col0 (type: int)
+                sort order: +
+                Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+                value expressions: _col1 (type: int), _col2 (type: char(8)), _col3 (type: char(32)), _col4 (type: varchar(15)), _col5 (type: varchar(18)), _col6 (type: decimal(10,2)), _col7 (type: decimal(25,15)), _col8 (type: string)
+      Execution mode: vectorized
+      Reduce Operator Tree:
+        Select Operator
+          expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: int), VALUE._col1 (type: char(8)), VALUE._col2 (type: char(32)), VALUE._col3 (type: varchar(15)), VALUE._col4 (type: varchar(18)), VALUE._col5 (type: decimal(10,2)), VALUE._col6 (type: decimal(25,15)), VALUE._col7 (type: string)
+          outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
+          Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+          File Output Operator
+            compressed: false
+            Statistics: Num rows: 13 Data size: 8684 Basic stats: COMPLETE Column stats: NONE
+            table:
+                input format: org.apache.hadoop.mapred.SequenceFileInputFormat
+                output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
+                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
+
+  Stage: Stage-0
+    Fetch Operator
+      limit: -1
+      Processor Tree:
+        ListSink
+
+PREHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+PREHOOK: type: QUERY
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Input: default@part_change_same_type_different_params@part=1
+PREHOOK: Input: default@part_change_same_type_different_params@part=2
+#### A masked pattern was here ####
+POSTHOOK: query: select insert_num,part,c1,c2,c3,c4,c5,c6,b from part_change_same_type_different_params order by insert_num
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Input: default@part_change_same_type_different_params@part=1
+POSTHOOK: Input: default@part_change_same_type_different_params@part=2
+#### A masked pattern was here ####
+insert_num	part	c1	c2	c3	c4	c5	c6	b
+1	1	excess  	corporation believable          	gateway 	thumb repe	76855494.39	NULL	original
+10	2	dreamlan	raster  devastation             	association boa	lubricant century	5830.99	NULL	new
+11	2	tiger   	however center                  	propeller agoni	shocking misshapen	6946533.80	31608910.030000000000000	new
+12	2	  bulgin	extensive  ambivalent           	rastled	billion zeroes	943084.30	3090297719.717120349328271	new
+13	2	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+2	1	mutation	hideout authentic               	blankness sonic	hover know	42093605.00	3182652.406680000000000	original
+3	1	hibernat	country detox coyotes           	ball pulse cand	direct	1413570.30	8.309580815500000	original
+4	1	aquarium	encounter existent amuse        	fuse light head	bumper adm	5475414.65	25937.675256300400000	original
+5	1	12345678	1234567890123456789012345       	123456789012345	1234567890	12345678.12	1234567890.098765432100000	original
+6	1	hollow  	innocent crabs blushing         	ambition ebony 	liquor ageless par	NULL	3841833197.314137090000000	new
+7	1	wig feel	social fork drum                	search bump	conclusion percept	8.31	NULL	new
+8	1	bubble f	drain loyal station             	racket	antique business	0.69	22.832613278741300	new
+9	1	12345678	12345678901234567890123456789012	123456789012345	123456789012345678	NULL	1234567890.543210987654321	new
+PREHOOK: query: drop table part_change_same_type_different_params
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@part_change_same_type_different_params
+PREHOOK: Output: default@part_change_same_type_different_params
+POSTHOOK: query: drop table part_change_same_type_different_params
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@part_change_same_type_different_params
+POSTHOOK: Output: default@part_change_same_type_different_params


Mime
View raw message