hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vihan...@apache.org
Subject [2/2] hive git commit: HIVE-18718 : Integer like types throws error when there is a mismatch (Janaki Lahorani, reviewed by Vihang Karajgaonkar)
Date Fri, 16 Mar 2018 05:13:50 GMT
HIVE-18718 : Integer like types throws error when there is a mismatch (Janaki Lahorani, reviewed by Vihang Karajgaonkar)


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

Branch: refs/heads/master
Commit: 300433537a643efac35efc6398b5a55a1336de8a
Parents: 50e0077
Author: Vihang Karajgaonkar <vihang@cloudera.com>
Authored: Thu Mar 15 21:51:11 2018 -0700
Committer: Vihang Karajgaonkar <vihang@cloudera.com>
Committed: Thu Mar 15 21:51:11 2018 -0700

----------------------------------------------------------------------
 .../ql/io/parquet/convert/ETypeConverter.java   |   55 +
 .../parquet/vector/ParquetDataColumnReader.java |   30 +-
 .../vector/ParquetDataColumnReaderFactory.java  |  140 ++-
 .../vector/VectorizedListColumnReader.java      |   11 +-
 .../vector/VectorizedPrimitiveColumnReader.java |   70 +-
 .../clientpositive/type_change_test_int.q       |  346 ++++++
 .../type_change_test_int_vectorized.q           |  347 ++++++
 .../clientpositive/type_change_test_int.q.out   | 1082 ++++++++++++++++++
 .../type_change_test_int_vectorized.q.out       | 1082 ++++++++++++++++++
 9 files changed, 3106 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java
index 420559e..6b92b96 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/ETypeConverter.java
@@ -118,6 +118,28 @@ public enum ETypeConverter {
               parent.set(index, new DoubleWritable((float) value));
             }
           };
+        case serdeConstants.SMALLINT_TYPE_NAME:
+          return new PrimitiveConverter() {
+            @Override
+            public void addInt(final int value) {
+              if ((value >= Short.MIN_VALUE) && (value <= Short.MAX_VALUE)) {
+                parent.set(index, new IntWritable((int)value));
+              } else {
+                parent.set(index, null);
+              }
+            }
+          };
+        case serdeConstants.TINYINT_TYPE_NAME:
+          return new PrimitiveConverter() {
+            @Override
+            public void addInt(final int value) {
+              if ((value >= Byte.MIN_VALUE) && (value <= Byte.MAX_VALUE)) {
+                parent.set(index, new IntWritable((int)value));
+              } else {
+                parent.set(index, null);
+              }
+            }
+          };
         }
       }
       return new PrimitiveConverter() {
@@ -147,6 +169,39 @@ public enum ETypeConverter {
               parent.set(index, new DoubleWritable(value));
             }
           };
+        case serdeConstants.INT_TYPE_NAME:
+          return new PrimitiveConverter() {
+            @Override
+            public void addLong(long value) {
+              if ((value >= Integer.MIN_VALUE) && (value <= Integer.MAX_VALUE)) {
+                parent.set(index, new IntWritable((int)value));
+              } else {
+                parent.set(index, null);
+              }
+            }
+          };
+        case serdeConstants.SMALLINT_TYPE_NAME:
+          return new PrimitiveConverter() {
+            @Override
+            public void addLong(long value) {
+              if ((value >= Short.MIN_VALUE) && (value <= Short.MAX_VALUE)) {
+                parent.set(index, new IntWritable((int)value));
+              } else {
+                parent.set(index, null);
+              }
+            }
+          };
+        case serdeConstants.TINYINT_TYPE_NAME:
+          return new PrimitiveConverter() {
+            @Override
+            public void addLong(long value) {
+              if ((value >= Byte.MIN_VALUE) && (value <= Byte.MAX_VALUE)) {
+                parent.set(index, new IntWritable((int)value));
+              } else {
+                parent.set(index, null);
+              }
+            }
+          };
         }
       }
       return new PrimitiveConverter() {

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReader.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReader.java b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReader.java
index 6bfa95a..5e68022 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReader.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReader.java
@@ -49,8 +49,15 @@ public interface ParquetDataColumnReader {
 
   /**
    * @return the next Integer from the page
+   * Though the function is looking for an integer, it will return the value through long.
+   * The type of data saved as long can be changed to be int or smallint or tinyint.  In that case
+   * the value returned to the user will depend on the data.  If the data value is within the valid
+   * range accommodated by the read type, the data will be returned as is.  When data is not within
+   * the valid range, a NULL will be returned.  A long value saved in parquet files will be
+   * returned asis to facilitate the validity check.  Also, the vectorized representation uses
+   * a LongColumnVector to store integer values.
    */
-  int readInteger();
+  long readInteger();
 
   /**
    * @return the next Float from the page
@@ -98,6 +105,16 @@ public interface ParquetDataColumnReader {
   Timestamp readTimestamp();
 
   /**
+   * @param value data to be checked for validity
+   * @return is data valid for the type
+   * The type of the data in Parquet files need not match the type in HMS.  In that case
+   * the value returned to the user will depend on the data.  If the data value is within the valid
+   * range accommodated by the HMS type, the data will be returned as is.  When data is not within
+   * the valid range, a NULL will be returned.  This function will do the appropriate check.
+   */
+  boolean isValid(long value);
+
+  /**
    * @return the underlying dictionary if current reader is dictionary encoded
    */
   Dictionary getDictionary();
@@ -123,8 +140,15 @@ public interface ParquetDataColumnReader {
   /**
    * @param id in dictionary
    * @return the Integer from the dictionary by id
-   */
-  int readInteger(int id);
+   * Though the function is looking for an integer, it will return the value through long.
+   * The type of data saved as long can be changed to be int or smallint or tinyint.  In that case
+   * the value returned to the user will depend on the data.  If the data value is within the valid
+   * range accommodated by the read type, the data will be returned as is.  When data is not within
+   * the valid range, a NULL will be returned.  A long value saved in parquet files will be
+   * returned asis to facilitate the validity check.  Also, the vectorized representation uses
+   * a LongColumnVector to store integer values.
+   */
+  long readInteger(int id);
 
   /**
    * @param id in dictionary

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReaderFactory.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReaderFactory.java b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReaderFactory.java
index 898a2c6..d8009da 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReaderFactory.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/ParquetDataColumnReaderFactory.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.hive.common.type.HiveBaseChar;
 import org.apache.hadoop.hive.ql.exec.vector.expressions.StringExpr;
 import org.apache.hadoop.hive.ql.io.parquet.timestamp.NanoTime;
 import org.apache.hadoop.hive.ql.io.parquet.timestamp.NanoTimeUtils;
+import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.io.HiveDecimalWritable;
 import org.apache.hadoop.hive.serde2.typeinfo.CharTypeInfo;
 import org.apache.hadoop.hive.serde2.typeinfo.VarcharTypeInfo;
@@ -172,16 +173,21 @@ public final class ParquetDataColumnReaderFactory {
     }
 
     @Override
-    public int readInteger() {
+    public long readInteger() {
       return valuesReader.readInteger();
     }
 
     @Override
-    public int readInteger(int id) {
+    public long readInteger(int id) {
       return dict.decodeToInt(id);
     }
 
     @Override
+    public boolean isValid(long value) {
+      return true;
+    }
+
+    @Override
     public long readLong(int id) {
       return dict.decodeToLong(id);
     }
@@ -338,6 +344,16 @@ public final class ParquetDataColumnReaderFactory {
     }
 
     @Override
+    public long readInteger() {
+      return valuesReader.readLong();
+    }
+
+    @Override
+    public long readInteger(int id) {
+      return dict.decodeToLong(id);
+    }
+
+    @Override
     public float readFloat() {
       return valuesReader.readLong();
     }
@@ -405,6 +421,97 @@ public final class ParquetDataColumnReaderFactory {
   }
 
   /**
+   * The reader who reads long data using int type.
+   */
+  public static class Types64Int2IntPageReader extends TypesFromInt64PageReader {
+
+    public Types64Int2IntPageReader(ValuesReader realReader, int length) {
+      super(realReader, length);
+    }
+
+    public Types64Int2IntPageReader(Dictionary dict, int length) {
+      super(dict, length);
+    }
+
+    @Override
+    public boolean isValid(long value) {
+      return ((value <= Integer.MAX_VALUE) && (value >= Integer.MIN_VALUE));
+    }
+  }
+
+  /**
+   * The reader who reads long data using smallint type.
+   */
+  public static class Types64Int2SmallintPageReader extends TypesFromInt64PageReader {
+    public Types64Int2SmallintPageReader(ValuesReader realReader, int length) {
+      super(realReader, length);
+    }
+
+    public Types64Int2SmallintPageReader(Dictionary dict, int length) {
+      super(dict, length);
+    }
+
+    @Override
+    public boolean isValid(long value) {
+      return ((value <= Short.MAX_VALUE) && (value >= Short.MIN_VALUE));
+    }
+  }
+
+  /**
+   * The reader who reads long data using tinyint type.
+   */
+  public static class Types64Int2TinyintPageReader extends TypesFromInt64PageReader {
+    public Types64Int2TinyintPageReader(ValuesReader realReader, int length) {
+      super(realReader, length);
+    }
+
+    public Types64Int2TinyintPageReader(Dictionary dict, int length) {
+      super(dict, length);
+    }
+
+    @Override
+    public boolean isValid(long value) {
+      return ((value <= Byte.MAX_VALUE) && (value >= Byte.MIN_VALUE));
+    }
+  }
+
+  /**
+   * The reader who reads int data using smallint type.
+   */
+  public static class Types32Int2SmallintPageReader extends TypesFromInt32PageReader {
+    public Types32Int2SmallintPageReader(ValuesReader realReader, int length) {
+      super(realReader, length);
+    }
+
+    public Types32Int2SmallintPageReader(Dictionary dict, int length) {
+      super(dict, length);
+    }
+
+    @Override
+    public boolean isValid(long value) {
+      return ((value <= Short.MAX_VALUE) && (value >= Short.MIN_VALUE));
+    }
+  }
+
+  /**
+   * The reader who reads int data using tinyint type.
+   */
+  public static class Types32Int2TinyintPageReader extends TypesFromInt32PageReader {
+    public Types32Int2TinyintPageReader(ValuesReader realReader, int length) {
+      super(realReader, length);
+    }
+
+    public Types32Int2TinyintPageReader(Dictionary dict, int length) {
+      super(dict, length);
+    }
+
+    @Override
+    public boolean isValid(long value) {
+      return ((value <= Byte.MAX_VALUE) && (value >= Byte.MIN_VALUE));
+    }
+  }
+
+  /**
    * The reader who reads from the underlying float value value. Implementation is in consist with
    * ETypeConverter EFLOAT_CONVERTER
    */
@@ -812,11 +919,32 @@ public final class ParquetDataColumnReaderFactory {
 
     switch (parquetType.getPrimitiveTypeName()) {
     case INT32:
-      return isDictionary ? new TypesFromInt32PageReader(dictionary, length) : new
-          TypesFromInt32PageReader(valuesReader, length);
+      switch (hiveType.getTypeName()) {
+      case serdeConstants.SMALLINT_TYPE_NAME:
+        return isDictionary ? new Types32Int2SmallintPageReader(dictionary,
+            length) : new Types32Int2SmallintPageReader(valuesReader, length);
+      case serdeConstants.TINYINT_TYPE_NAME:
+        return isDictionary ? new Types32Int2TinyintPageReader(dictionary,
+            length) : new Types32Int2TinyintPageReader(valuesReader, length);
+      default:
+        return isDictionary ? new TypesFromInt32PageReader(dictionary,
+            length) : new TypesFromInt32PageReader(valuesReader, length);
+      }
     case INT64:
-      return isDictionary ? new TypesFromInt64PageReader(dictionary, length) : new
-          TypesFromInt64PageReader(valuesReader, length);
+      switch (hiveType.getTypeName()) {
+      case serdeConstants.INT_TYPE_NAME:
+        return isDictionary ? new Types64Int2IntPageReader(dictionary,
+            length) : new Types64Int2IntPageReader(valuesReader, length);
+      case serdeConstants.SMALLINT_TYPE_NAME:
+        return isDictionary ? new Types64Int2SmallintPageReader(dictionary,
+            length) : new Types64Int2SmallintPageReader(valuesReader, length);
+      case serdeConstants.TINYINT_TYPE_NAME:
+        return isDictionary ? new Types64Int2TinyintPageReader(dictionary,
+            length) : new Types64Int2TinyintPageReader(valuesReader, length);
+      default:
+        return isDictionary ? new TypesFromInt64PageReader(dictionary,
+            length) : new TypesFromInt64PageReader(valuesReader, length);
+      }
     case FLOAT:
       return isDictionary ? new TypesFromFloatPageReader(dictionary, length) : new
           TypesFromFloatPageReader(valuesReader, length);

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java
index cd2c0ee..7e52b07 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java
@@ -273,20 +273,15 @@ public class VectorizedListColumnReader extends BaseVectorizedColumnReader {
     int total = valueList.size();
     setChildrenInfo(lcv, total, elementNum);
     switch (category) {
-    case INT:
-    case BYTE:
-    case SHORT:
-      lcv.child = new LongColumnVector(total);
-      for (int i = 0; i < valueList.size(); i++) {
-        ((LongColumnVector) lcv.child).vector[i] = ((List<Integer>) valueList).get(i);
-      }
-      break;
     case BOOLEAN:
       lcv.child = new LongColumnVector(total);
       for (int i = 0; i < valueList.size(); i++) {
         ((LongColumnVector) lcv.child).vector[i] = ((List<Integer>) valueList).get(i);
       }
       break;
+    case INT:
+    case BYTE:
+    case SHORT:
     case DATE:
     case INTERVAL_YEAR_MONTH:
     case LONG:

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedPrimitiveColumnReader.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedPrimitiveColumnReader.java b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedPrimitiveColumnReader.java
index 1442d69..4e6993b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedPrimitiveColumnReader.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedPrimitiveColumnReader.java
@@ -121,6 +121,12 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
     }
   }
 
+  private static void setNullValue(ColumnVector c, int rowId) {
+    c.isNull[rowId] = true;
+    c.isRepeating = false;
+    c.noNulls = false;
+  }
+
   private void readDictionaryIDs(
       int total,
       LongColumnVector c,
@@ -133,9 +139,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isNull[rowId] = false;
         c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -151,12 +155,15 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
       readRepetitionAndDefinitionLevels();
       if (definitionLevel >= maxDefLevel) {
         c.vector[rowId] = dataColumn.readInteger();
-        c.isNull[rowId] = false;
-        c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
+        if (dataColumn.isValid(c.vector[rowId])) {
+          c.isNull[rowId] = false;
+          c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
+        } else {
+          c.vector[rowId] = 0;
+          setNullValue(c, rowId);
+        }
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -175,9 +182,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isNull[rowId] = false;
         c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -196,9 +201,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isNull[rowId] = false;
         c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -217,9 +220,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isNull[rowId] = false;
         c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -238,9 +239,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isNull[rowId] = false;
         c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -262,9 +261,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isNull[rowId] = false;
         c.isRepeating = c.isRepeating && (c.vector[0] == c.vector[rowId]);
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -284,9 +281,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         // TODO figure out a better way to set repeat for Binary type
         c.isRepeating = false;
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -306,9 +301,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         // TODO figure out a better way to set repeat for Binary type
         c.isRepeating = false;
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -328,9 +321,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         // TODO figure out a better way to set repeat for Binary type
         c.isRepeating = false;
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -350,9 +341,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         // TODO figure out a better way to set repeat for Binary type
         c.isRepeating = false;
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -377,9 +366,7 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
         c.isRepeating =
             c.isRepeating && ((c.time[0] == c.time[rowId]) && (c.nanos[0] == c.nanos[rowId]));
       } else {
-        c.isNull[rowId] = true;
-        c.isRepeating = false;
-        c.noNulls = false;
+        setNullValue(c, rowId);
       }
       rowId++;
       left--;
@@ -411,8 +398,11 @@ public class VectorizedPrimitiveColumnReader extends BaseVectorizedColumnReader
       for (int i = rowId; i < rowId + num; ++i) {
         ((LongColumnVector) column).vector[i] =
             dictionary.readInteger((int) dictionaryIds.vector[i]);
-      }
-      break;
+        if (!(dictionary.isValid(((LongColumnVector) column).vector[i]))) {
+          setNullValue(column, i);
+          ((LongColumnVector) column).vector[i] = 0;
+        }
+      } break;
     case DATE:
     case INTERVAL_YEAR_MONTH:
     case LONG:

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/test/queries/clientpositive/type_change_test_int.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/type_change_test_int.q b/ql/src/test/queries/clientpositive/type_change_test_int.q
new file mode 100644
index 0000000..02ecc3d
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/type_change_test_int.q
@@ -0,0 +1,346 @@
+-- Create a base table to be used for loading data: Begin
+drop table if exists testAltCol;
+create table testAltCol
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       INT,
+ cSmallInt  SMALLINT,
+ cTinyint   TINYINT);
+
+insert into testAltCol values
+(1,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123);
+
+insert into testAltCol values
+(2,
+ 1,
+ 2,
+ 3,
+ 4);
+
+insert into testAltCol values
+(3,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123);
+
+insert into testAltCol values
+(4,
+ -1234567890123456789,
+ -1234567890,
+ -12345,
+ -123);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltCol order by cId;
+-- Create a base table to be used for loading data: End
+
+-- Enable change of column type
+SET hive.metastore.disallow.incompatible.col.type.changes=false;
+
+-- Disable vectorization
+SET hive.vectorized.execution.enabled=false;
+
+-- Text type: Begin
+drop table if exists testAltColT;
+
+create table testAltColT stored as textfile as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+drop table if exists testAltColT;
+-- Text type: End
+
+-- Sequence File type: Begin
+drop table if exists testAltColSF;
+
+create table testAltColSF stored as sequencefile as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+drop table if exists testAltColSF;
+-- Sequence File type: End
+
+-- RCFile type: Begin
+drop table if exists testAltColRCF;
+
+create table testAltColRCF stored as rcfile as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+drop table if exists testAltColRCF;
+-- RCFile type: End
+
+-- ORC type: Begin
+drop table if exists testAltColORC;
+
+create table testAltColORC stored as orc as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+drop table if exists testAltColORC;
+-- ORC type: End
+
+-- Parquet type with Dictionary encoding enabled: Begin
+drop table if exists testAltColPDE;
+
+create table testAltColPDE stored as parquet as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+drop table if exists testAltColPDE;
+-- Parquet type with Dictionary encoding enabled: End
+
+-- Parquet type with Dictionary encoding disabled: Begin
+drop table if exists testAltColPDD;
+
+create table testAltColPDD stored as parquet tblproperties ("parquet.enable.dictionary"="false") as
+select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+drop table if exists testAltColPDD;
+-- Parquet type with Dictionary encoding enabled: End

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/test/queries/clientpositive/type_change_test_int_vectorized.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/type_change_test_int_vectorized.q b/ql/src/test/queries/clientpositive/type_change_test_int_vectorized.q
new file mode 100644
index 0000000..90a390b
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/type_change_test_int_vectorized.q
@@ -0,0 +1,347 @@
+-- Create a base table to be used for loading data: Begin
+drop table if exists testAltCol;
+create table testAltCol
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       INT,
+ cSmallInt  SMALLINT,
+ cTinyint   TINYINT);
+
+insert into testAltCol values
+(1,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123);
+
+insert into testAltCol values
+(2,
+ 1,
+ 2,
+ 3,
+ 4);
+
+insert into testAltCol values
+(3,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123);
+
+insert into testAltCol values
+(4,
+ -1234567890123456789,
+ -1234567890,
+ -12345,
+ -123);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltCol order by cId;
+-- Create a base table to be used for loading data: End
+
+-- Enable change of column type
+SET hive.metastore.disallow.incompatible.col.type.changes=false;
+
+-- Enable vectorization
+SET hive.vectorized.execution.enabled=true;
+
+-- Text type: Begin
+drop table if exists testAltColT;
+
+create table testAltColT stored as textfile as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId;
+
+drop table if exists testAltColT;
+-- Text type: End
+
+-- Sequence File type: Begin
+drop table if exists testAltColSF;
+
+create table testAltColSF stored as sequencefile as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId;
+
+drop table if exists testAltColSF;
+-- Sequence File type: End
+
+-- RCFile type: Begin
+drop table if exists testAltColRCF;
+
+create table testAltColRCF stored as rcfile as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId;
+
+drop table if exists testAltColRCF;
+-- RCFile type: End
+
+-- ORC type: Begin
+drop table if exists testAltColORC;
+
+create table testAltColORC stored as orc as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId;
+
+drop table if exists testAltColORC;
+-- ORC type: End
+
+-- Parquet type with Dictionary encoding enabled: Begin
+drop table if exists testAltColPDE;
+
+create table testAltColPDE stored as parquet as select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cSmallInt  SMALLINT,
+ cInt       SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId;
+
+drop table if exists testAltColPDE;
+-- Parquet type with Dictionary encoding enabled: End
+
+-- Parquet type with Dictionary encoding disabled: Begin
+drop table if exists testAltColPDD;
+
+create table testAltColPDD stored as parquet tblproperties ("parquet.enable.dictionary"="false") as
+select * from testAltCol;
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to bigint
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to int
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to smallint
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+-- bigint, int, smallint, and tinyint: type changed to tinyint
+alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT);
+
+select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId;
+
+drop table if exists testAltColPDD;
+-- Parquet type with Dictionary encoding enabled: End
+

http://git-wip-us.apache.org/repos/asf/hive/blob/30043353/ql/src/test/results/clientpositive/type_change_test_int.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/type_change_test_int.q.out b/ql/src/test/results/clientpositive/type_change_test_int.q.out
new file mode 100644
index 0000000..2237a0e
--- /dev/null
+++ b/ql/src/test/results/clientpositive/type_change_test_int.q.out
@@ -0,0 +1,1082 @@
+PREHOOK: query: drop table if exists testAltCol
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltCol
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltCol
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       INT,
+ cSmallInt  SMALLINT,
+ cTinyint   TINYINT)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltCol
+POSTHOOK: query: create table testAltCol
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       INT,
+ cSmallInt  SMALLINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltCol
+PREHOOK: query: insert into testAltCol values
+(1,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@testaltcol
+POSTHOOK: query: insert into testAltCol values
+(1,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@testaltcol
+POSTHOOK: Lineage: testaltcol.cbigint SCRIPT []
+POSTHOOK: Lineage: testaltcol.cid SCRIPT []
+POSTHOOK: Lineage: testaltcol.cint SCRIPT []
+POSTHOOK: Lineage: testaltcol.csmallint SCRIPT []
+POSTHOOK: Lineage: testaltcol.ctinyint SCRIPT []
+PREHOOK: query: insert into testAltCol values
+(2,
+ 1,
+ 2,
+ 3,
+ 4)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@testaltcol
+POSTHOOK: query: insert into testAltCol values
+(2,
+ 1,
+ 2,
+ 3,
+ 4)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@testaltcol
+POSTHOOK: Lineage: testaltcol.cbigint SCRIPT []
+POSTHOOK: Lineage: testaltcol.cid SCRIPT []
+POSTHOOK: Lineage: testaltcol.cint SCRIPT []
+POSTHOOK: Lineage: testaltcol.csmallint SCRIPT []
+POSTHOOK: Lineage: testaltcol.ctinyint SCRIPT []
+PREHOOK: query: insert into testAltCol values
+(3,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@testaltcol
+POSTHOOK: query: insert into testAltCol values
+(3,
+ 1234567890123456789,
+ 1234567890,
+ 12345,
+ 123)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@testaltcol
+POSTHOOK: Lineage: testaltcol.cbigint SCRIPT []
+POSTHOOK: Lineage: testaltcol.cid SCRIPT []
+POSTHOOK: Lineage: testaltcol.cint SCRIPT []
+POSTHOOK: Lineage: testaltcol.csmallint SCRIPT []
+POSTHOOK: Lineage: testaltcol.ctinyint SCRIPT []
+PREHOOK: query: insert into testAltCol values
+(4,
+ -1234567890123456789,
+ -1234567890,
+ -12345,
+ -123)
+PREHOOK: type: QUERY
+PREHOOK: Input: _dummy_database@_dummy_table
+PREHOOK: Output: default@testaltcol
+POSTHOOK: query: insert into testAltCol values
+(4,
+ -1234567890123456789,
+ -1234567890,
+ -12345,
+ -123)
+POSTHOOK: type: QUERY
+POSTHOOK: Input: _dummy_database@_dummy_table
+POSTHOOK: Output: default@testaltcol
+POSTHOOK: Lineage: testaltcol.cbigint SCRIPT []
+POSTHOOK: Lineage: testaltcol.cid SCRIPT []
+POSTHOOK: Lineage: testaltcol.cint SCRIPT []
+POSTHOOK: Lineage: testaltcol.csmallint SCRIPT []
+POSTHOOK: Lineage: testaltcol.ctinyint SCRIPT []
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltCol order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcol
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltCol order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcol
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: drop table if exists testAltColT
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltColT
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltColT stored as textfile as select * from testAltCol
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@testaltcol
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltColT
+POSTHOOK: query: create table testAltColT stored as textfile as select * from testAltCol
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@testaltcol
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltColT
+POSTHOOK: Lineage: testaltcolt.cbigint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: testaltcolt.cid SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cid, type:tinyint, comment:null), ]
+POSTHOOK: Lineage: testaltcolt.cint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: testaltcolt.csmallint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: testaltcolt.ctinyint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolt
+PREHOOK: Output: default@testaltcolt
+POSTHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolt
+POSTHOOK: Output: default@testaltcolt
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolt
+PREHOOK: Output: default@testaltcolt
+POSTHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolt
+POSTHOOK: Output: default@testaltcolt
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+1	NULL	1234567890	12345	123
+2	1	2	3	4
+3	NULL	1234567890	12345	123
+4	NULL	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolt
+PREHOOK: Output: default@testaltcolt
+POSTHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolt
+POSTHOOK: Output: default@testaltcolt
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+1	NULL	NULL	12345	123
+2	1	2	3	4
+3	NULL	NULL	12345	123
+4	NULL	NULL	-12345	-123
+PREHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolt
+PREHOOK: Output: default@testaltcolt
+POSTHOOK: query: alter table testAltColT replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolt
+POSTHOOK: Output: default@testaltcolt
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColT order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolt
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	123
+2	1	2	3	4
+3	NULL	NULL	NULL	123
+4	NULL	NULL	NULL	-123
+PREHOOK: query: drop table if exists testAltColT
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@testaltcolt
+PREHOOK: Output: default@testaltcolt
+POSTHOOK: query: drop table if exists testAltColT
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@testaltcolt
+POSTHOOK: Output: default@testaltcolt
+PREHOOK: query: drop table if exists testAltColSF
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltColSF
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltColSF stored as sequencefile as select * from testAltCol
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@testaltcol
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltColSF
+POSTHOOK: query: create table testAltColSF stored as sequencefile as select * from testAltCol
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@testaltcol
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltColSF
+POSTHOOK: Lineage: testaltcolsf.cbigint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: testaltcolsf.cid SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cid, type:tinyint, comment:null), ]
+POSTHOOK: Lineage: testaltcolsf.cint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: testaltcolsf.csmallint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: testaltcolsf.ctinyint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolsf
+PREHOOK: Output: default@testaltcolsf
+POSTHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolsf
+POSTHOOK: Output: default@testaltcolsf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolsf
+PREHOOK: Output: default@testaltcolsf
+POSTHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolsf
+POSTHOOK: Output: default@testaltcolsf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+1	NULL	1234567890	12345	123
+2	1	2	3	4
+3	NULL	1234567890	12345	123
+4	NULL	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolsf
+PREHOOK: Output: default@testaltcolsf
+POSTHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolsf
+POSTHOOK: Output: default@testaltcolsf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+1	NULL	NULL	12345	123
+2	1	2	3	4
+3	NULL	NULL	12345	123
+4	NULL	NULL	-12345	-123
+PREHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolsf
+PREHOOK: Output: default@testaltcolsf
+POSTHOOK: query: alter table testAltColSF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolsf
+POSTHOOK: Output: default@testaltcolsf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColSF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolsf
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	123
+2	1	2	3	4
+3	NULL	NULL	NULL	123
+4	NULL	NULL	NULL	-123
+PREHOOK: query: drop table if exists testAltColSF
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@testaltcolsf
+PREHOOK: Output: default@testaltcolsf
+POSTHOOK: query: drop table if exists testAltColSF
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@testaltcolsf
+POSTHOOK: Output: default@testaltcolsf
+PREHOOK: query: drop table if exists testAltColRCF
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltColRCF
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltColRCF stored as rcfile as select * from testAltCol
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@testaltcol
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltColRCF
+POSTHOOK: query: create table testAltColRCF stored as rcfile as select * from testAltCol
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@testaltcol
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltColRCF
+POSTHOOK: Lineage: testaltcolrcf.cbigint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: testaltcolrcf.cid SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cid, type:tinyint, comment:null), ]
+POSTHOOK: Lineage: testaltcolrcf.cint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: testaltcolrcf.csmallint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: testaltcolrcf.ctinyint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolrcf
+PREHOOK: Output: default@testaltcolrcf
+POSTHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolrcf
+POSTHOOK: Output: default@testaltcolrcf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolrcf
+PREHOOK: Output: default@testaltcolrcf
+POSTHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolrcf
+POSTHOOK: Output: default@testaltcolrcf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+1	NULL	1234567890	12345	123
+2	1	2	3	4
+3	NULL	1234567890	12345	123
+4	NULL	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolrcf
+PREHOOK: Output: default@testaltcolrcf
+POSTHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolrcf
+POSTHOOK: Output: default@testaltcolrcf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+1	NULL	NULL	12345	123
+2	1	2	3	4
+3	NULL	NULL	12345	123
+4	NULL	NULL	-12345	-123
+PREHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolrcf
+PREHOOK: Output: default@testaltcolrcf
+POSTHOOK: query: alter table testAltColRCF replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolrcf
+POSTHOOK: Output: default@testaltcolrcf
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColRCF order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolrcf
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	123
+2	1	2	3	4
+3	NULL	NULL	NULL	123
+4	NULL	NULL	NULL	-123
+PREHOOK: query: drop table if exists testAltColRCF
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@testaltcolrcf
+PREHOOK: Output: default@testaltcolrcf
+POSTHOOK: query: drop table if exists testAltColRCF
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@testaltcolrcf
+POSTHOOK: Output: default@testaltcolrcf
+PREHOOK: query: drop table if exists testAltColORC
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltColORC
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltColORC stored as orc as select * from testAltCol
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@testaltcol
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltColORC
+POSTHOOK: query: create table testAltColORC stored as orc as select * from testAltCol
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@testaltcol
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltColORC
+POSTHOOK: Lineage: testaltcolorc.cbigint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: testaltcolorc.cid SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cid, type:tinyint, comment:null), ]
+POSTHOOK: Lineage: testaltcolorc.cint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: testaltcolorc.csmallint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: testaltcolorc.ctinyint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolorc
+PREHOOK: Output: default@testaltcolorc
+POSTHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolorc
+POSTHOOK: Output: default@testaltcolorc
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolorc
+PREHOOK: Output: default@testaltcolorc
+POSTHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolorc
+POSTHOOK: Output: default@testaltcolorc
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+1	NULL	1234567890	12345	123
+2	1	2	3	4
+3	NULL	1234567890	12345	123
+4	NULL	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolorc
+PREHOOK: Output: default@testaltcolorc
+POSTHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolorc
+POSTHOOK: Output: default@testaltcolorc
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+1	NULL	NULL	12345	123
+2	1	2	3	4
+3	NULL	NULL	12345	123
+4	NULL	NULL	-12345	-123
+PREHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolorc
+PREHOOK: Output: default@testaltcolorc
+POSTHOOK: query: alter table testAltColORC replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolorc
+POSTHOOK: Output: default@testaltcolorc
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColORC order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolorc
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	123
+2	1	2	3	4
+3	NULL	NULL	NULL	123
+4	NULL	NULL	NULL	-123
+PREHOOK: query: drop table if exists testAltColORC
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@testaltcolorc
+PREHOOK: Output: default@testaltcolorc
+POSTHOOK: query: drop table if exists testAltColORC
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@testaltcolorc
+POSTHOOK: Output: default@testaltcolorc
+PREHOOK: query: drop table if exists testAltColPDE
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltColPDE
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltColPDE stored as parquet as select * from testAltCol
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@testaltcol
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltColPDE
+POSTHOOK: query: create table testAltColPDE stored as parquet as select * from testAltCol
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@testaltcol
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltColPDE
+POSTHOOK: Lineage: testaltcolpde.cbigint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: testaltcolpde.cid SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cid, type:tinyint, comment:null), ]
+POSTHOOK: Lineage: testaltcolpde.cint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: testaltcolpde.csmallint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: testaltcolpde.ctinyint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpde
+PREHOOK: Output: default@testaltcolpde
+POSTHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpde
+POSTHOOK: Output: default@testaltcolpde
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpde
+PREHOOK: Output: default@testaltcolpde
+POSTHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpde
+POSTHOOK: Output: default@testaltcolpde
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+1	NULL	1234567890	12345	123
+2	1	2	3	4
+3	NULL	1234567890	12345	123
+4	NULL	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpde
+PREHOOK: Output: default@testaltcolpde
+POSTHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpde
+POSTHOOK: Output: default@testaltcolpde
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+1	NULL	NULL	12345	123
+2	1	2	3	4
+3	NULL	NULL	12345	123
+4	NULL	NULL	-12345	-123
+PREHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpde
+PREHOOK: Output: default@testaltcolpde
+POSTHOOK: query: alter table testAltColPDE replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpde
+POSTHOOK: Output: default@testaltcolpde
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDE order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpde
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	123
+2	1	2	3	4
+3	NULL	NULL	NULL	123
+4	NULL	NULL	NULL	-123
+PREHOOK: query: drop table if exists testAltColPDE
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@testaltcolpde
+PREHOOK: Output: default@testaltcolpde
+POSTHOOK: query: drop table if exists testAltColPDE
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@testaltcolpde
+POSTHOOK: Output: default@testaltcolpde
+PREHOOK: query: drop table if exists testAltColPDD
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists testAltColPDD
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table testAltColPDD stored as parquet tblproperties ("parquet.enable.dictionary"="false") as
+select * from testAltCol
+PREHOOK: type: CREATETABLE_AS_SELECT
+PREHOOK: Input: default@testaltcol
+PREHOOK: Output: database:default
+PREHOOK: Output: default@testAltColPDD
+POSTHOOK: query: create table testAltColPDD stored as parquet tblproperties ("parquet.enable.dictionary"="false") as
+select * from testAltCol
+POSTHOOK: type: CREATETABLE_AS_SELECT
+POSTHOOK: Input: default@testaltcol
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@testAltColPDD
+POSTHOOK: Lineage: testaltcolpdd.cbigint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cbigint, type:bigint, comment:null), ]
+POSTHOOK: Lineage: testaltcolpdd.cid SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cid, type:tinyint, comment:null), ]
+POSTHOOK: Lineage: testaltcolpdd.cint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:cint, type:int, comment:null), ]
+POSTHOOK: Lineage: testaltcolpdd.csmallint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:csmallint, type:smallint, comment:null), ]
+POSTHOOK: Lineage: testaltcolpdd.ctinyint SIMPLE [(testaltcol)testaltcol.FieldSchema(name:ctinyint, type:tinyint, comment:null), ]
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpdd
+PREHOOK: Output: default@testaltcolpdd
+POSTHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    BIGINT,
+ cInt       BIGINT,
+ cSmallInt  BIGINT,
+ cTinyint   BIGINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpdd
+POSTHOOK: Output: default@testaltcolpdd
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+1	1234567890123456789	1234567890	12345	123
+2	1	2	3	4
+3	1234567890123456789	1234567890	12345	123
+4	-1234567890123456789	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpdd
+PREHOOK: Output: default@testaltcolpdd
+POSTHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    INT,
+ cInt       INT,
+ cSmallInt  INT,
+ cTinyint   INT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpdd
+POSTHOOK: Output: default@testaltcolpdd
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+1	NULL	1234567890	12345	123
+2	1	2	3	4
+3	NULL	1234567890	12345	123
+4	NULL	-1234567890	-12345	-123
+PREHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpdd
+PREHOOK: Output: default@testaltcolpdd
+POSTHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    SMALLINT,
+ cInt       SMALLINT,
+ cSmallInt  SMALLINT,
+ cTinyint   SMALLINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpdd
+POSTHOOK: Output: default@testaltcolpdd
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+1	NULL	NULL	12345	123
+2	1	2	3	4
+3	NULL	NULL	12345	123
+4	NULL	NULL	-12345	-123
+PREHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+PREHOOK: type: ALTERTABLE_REPLACECOLS
+PREHOOK: Input: default@testaltcolpdd
+PREHOOK: Output: default@testaltcolpdd
+POSTHOOK: query: alter table testAltColPDD replace columns
+(cId        TINYINT,
+ cBigInt    TINYINT,
+ cInt       TINYINT,
+ cSmallInt  TINYINT,
+ cTinyint   TINYINT)
+POSTHOOK: type: ALTERTABLE_REPLACECOLS
+POSTHOOK: Input: default@testaltcolpdd
+POSTHOOK: Output: default@testaltcolpdd
+PREHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+PREHOOK: type: QUERY
+PREHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+POSTHOOK: query: select cId, cBigInt, cInt, cSmallInt, cTinyint from testAltColPDD order by cId
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@testaltcolpdd
+#### A masked pattern was here ####
+1	NULL	NULL	NULL	123
+2	1	2	3	4
+3	NULL	NULL	NULL	123
+4	NULL	NULL	NULL	-123
+PREHOOK: query: drop table if exists testAltColPDD
+PREHOOK: type: DROPTABLE
+PREHOOK: Input: default@testaltcolpdd
+PREHOOK: Output: default@testaltcolpdd
+POSTHOOK: query: drop table if exists testAltColPDD
+POSTHOOK: type: DROPTABLE
+POSTHOOK: Input: default@testaltcolpdd
+POSTHOOK: Output: default@testaltcolpdd


Mime
View raw message