hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1673969 [18/19] - in /hive/branches/llap: ./ beeline/src/java/org/apache/hive/beeline/ bin/ cli/src/java/org/apache/hadoop/hive/cli/ cli/src/test/org/apache/hadoop/hive/cli/ common/ common/src/java/org/apache/hadoop/hive/common/jsonexplain...
Date Wed, 15 Apr 2015 22:04:07 GMT
Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/WriteBuffers.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/WriteBuffers.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/WriteBuffers.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/WriteBuffers.java Wed Apr 15 22:04:00 2015
@@ -303,6 +303,38 @@ public final class WriteBuffers implemen
     return true;
   }
 
+  /**
+   * Compares part of the buffer with a part of an external byte array.
+   * Does not modify readPoint.
+   */
+  public boolean isEqual(byte[] left, int leftOffset, int leftLength, long rightOffset, int rightLength) {
+    if (rightLength != leftLength) {
+      return false;
+    }
+    int rightIndex = getBufferIndex(rightOffset), rightFrom = getOffset(rightOffset);
+    byte[] rightBuffer = writeBuffers.get(rightIndex);
+    if (rightFrom + rightLength <= wbSize) {
+      // TODO: allow using unsafe optionally.
+      for (int i = 0; i < leftLength; ++i) {
+        if (left[leftOffset + i] != rightBuffer[rightFrom + i]) {
+          return false;
+        }
+      }
+      return true;
+    }
+    for (int i = 0; i < rightLength; ++i) {
+      if (rightFrom == wbSize) {
+        ++rightIndex;
+        rightBuffer = writeBuffers.get(rightIndex);
+        rightFrom = 0;
+      }
+      if (left[leftOffset + i] != rightBuffer[rightFrom++]) {
+        return false;
+      }
+    }
+    return true;
+  }
+
   public void clear() {
     writeBuffers.clear();
     clearState();
@@ -520,6 +552,19 @@ public final class WriteBuffers implemen
     writePos.bufferIndex = prevIndex;
     writePos.buffer = writeBuffers.get(writePos.bufferIndex);
     writePos.offset = prevOffset;
+  }
+
+
+  @Override
+  public void writeByte(long offset, byte value) {
+    int prevIndex = writePos.bufferIndex, prevOffset = writePos.offset;
+    setWritePoint(offset);
+    // One byte is always available for writing.
+    writePos.buffer[writePos.offset] = value;
+
+    writePos.bufferIndex = prevIndex;
+    writePos.buffer = writeBuffers.get(writePos.bufferIndex);
+    writePos.offset = prevOffset;
   }
 
   // Lifted from org.apache.hadoop.util.hash.MurmurHash... but supports offset.

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/BinarySortableSerDe.java Wed Apr 15 22:04:00 2015
@@ -132,7 +132,7 @@ public class BinarySortableSerDe extends
   boolean[] columnSortOrderIsDesc;
 
   private static byte[] decimalBuffer = null;
-  private static Charset decimalCharSet = Charset.forName("US-ASCII");
+  public static Charset decimalCharSet = Charset.forName("US-ASCII");
 
   @Override
   public void initialize(Configuration conf, Properties tbl)
@@ -572,7 +572,7 @@ public class BinarySortableSerDe extends
     return ((BaseCharTypeInfo)type).getLength();
   }
 
-  static Text deserializeText(InputByteBuffer buffer, boolean invert, Text r)
+  public static Text deserializeText(InputByteBuffer buffer, boolean invert, Text r)
       throws IOException {
     // Get the actual length first
     int start = buffer.tell();
@@ -636,7 +636,7 @@ public class BinarySortableSerDe extends
     return serializeBytesWritable;
   }
 
-  private static void writeByte(RandomAccessOutput buffer, byte b, boolean invert) {
+  public static void writeByte(RandomAccessOutput buffer, byte b, boolean invert) {
     if (invert) {
       b = (byte) (0xff ^ b);
     }
@@ -892,7 +892,7 @@ public class BinarySortableSerDe extends
 
   }
 
-  private static void serializeBytes(
+  public static void serializeBytes(
       ByteStream.Output buffer, byte[] data, int length, boolean invert) {
     for (int i = 0; i < length; i++) {
       if (data[i] == 0 || data[i] == 1) {
@@ -905,14 +905,27 @@ public class BinarySortableSerDe extends
     writeByte(buffer, (byte) 0, invert);
   }
 
-  private static void serializeInt(ByteStream.Output buffer, int v, boolean invert) {
+  public static void serializeBytes(
+      ByteStream.Output buffer, byte[] data, int offset, int length, boolean invert) {
+    for (int i = offset; i < offset + length; i++) {
+      if (data[i] == 0 || data[i] == 1) {
+        writeByte(buffer, (byte) 1, invert);
+        writeByte(buffer, (byte) (data[i] + 1), invert);
+      } else {
+        writeByte(buffer, data[i], invert);
+      }
+    }
+    writeByte(buffer, (byte) 0, invert);
+  }
+
+  public static void serializeInt(ByteStream.Output buffer, int v, boolean invert) {
     writeByte(buffer, (byte) ((v >> 24) ^ 0x80), invert);
     writeByte(buffer, (byte) (v >> 16), invert);
     writeByte(buffer, (byte) (v >> 8), invert);
     writeByte(buffer, (byte) v, invert);
   }
 
-  private static void serializeLong(ByteStream.Output buffer, long v, boolean invert) {
+  public static void serializeLong(ByteStream.Output buffer, long v, boolean invert) {
     writeByte(buffer, (byte) ((v >> 56) ^ 0x80), invert);
     writeByte(buffer, (byte) (v >> 48), invert);
     writeByte(buffer, (byte) (v >> 40), invert);

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/InputByteBuffer.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/InputByteBuffer.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/InputByteBuffer.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/binarysortable/InputByteBuffer.java Wed Apr 15 22:04:00 2015
@@ -78,6 +78,10 @@ public class InputByteBuffer {
     return end;
   }
 
+  public final boolean isEof() {
+    return (start >= end);
+  }
+
   /**
    * Returns the underlying byte array.
    */

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/io/DateWritable.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/io/DateWritable.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/io/DateWritable.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/io/DateWritable.java Wed Apr 15 22:04:00 2015
@@ -25,9 +25,6 @@ import java.util.Calendar;
 import java.util.TimeZone;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hive.serde2.ByteStream.Output;
 import org.apache.hadoop.hive.serde2.ByteStream.RandomAccessOutput;
 import org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryUtils;
 import org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryUtils.VInt;
@@ -44,8 +41,6 @@ import org.apache.hadoop.io.WritableUtil
  *
  */
 public class DateWritable implements WritableComparable<DateWritable> {
-  private static final Log LOG = LogFactory.getLog(DateWritable.class);
-
   private static final long MILLIS_PER_DAY = TimeUnit.DAYS.toMillis(1);
 
   // Local time zone.
@@ -136,7 +131,13 @@ public class DateWritable implements Wri
 
   public static int millisToDays(long millisLocal) {
     long millisUtc = millisLocal + LOCAL_TIMEZONE.get().getOffset(millisLocal);
-    return (int)(millisUtc / MILLIS_PER_DAY);
+    int days;
+    if (millisUtc >= 0L) {
+      days = (int) (millisUtc / MILLIS_PER_DAY);
+    } else {
+      days = (int) ((millisUtc - 86399999) / MILLIS_PER_DAY);
+    }
+    return days;
   }
 
   public static int dateToDays(Date d) {

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyBinary.java Wed Apr 15 22:04:00 2015
@@ -54,7 +54,7 @@ public class LazyBinary extends LazyPrim
   }
 
   // todo this should be configured in serde
-  private byte[] decodeIfNeeded(byte[] recv) {
+  public static byte[] decodeIfNeeded(byte[] recv) {
     boolean arrayByteBase64 = Base64.isArrayByteBase64(recv);
     if (DEBUG_LOG_ENABLED && arrayByteBase64) {
       LOG.debug("Data only contains Base64 alphabets only so try to decode the data.");

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyUtils.java Wed Apr 15 22:04:00 2015
@@ -161,7 +161,7 @@ public final class LazyUtils {
         }
       }
     } else {
-      out.write(bytes, 0, len);
+      out.write(bytes, start, len);
     }
   }
 

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryStruct.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryStruct.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryStruct.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinaryStruct.java Wed Apr 15 22:04:00 2015
@@ -166,15 +166,18 @@ public class LazyBinaryStruct extends La
     // Extra bytes at the end?
     if (!extraFieldWarned && lastFieldByteEnd < structByteEnd) {
       extraFieldWarned = true;
-      LOG.warn("Extra bytes detected at the end of the row! Ignoring similar "
-          + "problems.");
+      LOG.warn("Extra bytes detected at the end of the row! " +
+           "Last field end " + lastFieldByteEnd + " and serialize buffer end " + structByteEnd + ". " +
+               "Ignoring similar problems.");
     }
 
     // Missing fields?
     if (!missingFieldWarned && lastFieldByteEnd > structByteEnd) {
       missingFieldWarned = true;
-      LOG.info("Missing fields! Expected " + fields.length + " fields but "
-          + "only got " + fieldId + "! Ignoring similar problems.");
+      LOG.info("Missing fields! Expected " + fields.length + " fields but " +
+              "only got " + fieldId + "! " +
+          "Last field end " + lastFieldByteEnd + " and serialize buffer end " + structByteEnd + ". " +
+          "Ignoring similar problems.");
     }
 
     Arrays.fill(fieldInited, false);

Modified: hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveDecimalObjectInspector.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveDecimalObjectInspector.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveDecimalObjectInspector.java (original)
+++ hive/branches/llap/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/primitive/WritableHiveDecimalObjectInspector.java Wed Apr 15 22:04:00 2015
@@ -29,7 +29,7 @@ implements SettableHiveDecimalObjectInsp
   public WritableHiveDecimalObjectInspector() {
   }
 
-  protected WritableHiveDecimalObjectInspector(DecimalTypeInfo typeInfo) {
+  public WritableHiveDecimalObjectInspector(DecimalTypeInfo typeInfo) {
     super(typeInfo);
   }
 

Modified: hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java (original)
+++ hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/TestStatsSerde.java Wed Apr 15 22:04:00 2015
@@ -30,7 +30,9 @@ import org.apache.hadoop.hive.common.typ
 import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.binarysortable.MyTestClass;
 import org.apache.hadoop.hive.serde2.binarysortable.MyTestInnerStruct;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass;
 import org.apache.hadoop.hive.serde2.binarysortable.TestBinarySortableSerDe;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass.ExtraTypeInfo;
 import org.apache.hadoop.hive.serde2.columnar.BytesRefArrayWritable;
 import org.apache.hadoop.hive.serde2.columnar.BytesRefWritable;
 import org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe;
@@ -104,24 +106,11 @@ public class TestStatsSerde extends Test
       int num = 1000;
       Random r = new Random(1234);
       MyTestClass rows[] = new MyTestClass[num];
+
       for (int i = 0; i < num; i++) {
-        int randField = r.nextInt(12);
-        Byte b = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-        Short s = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-        Integer n = randField > 2 ? null : Integer.valueOf(r.nextInt());
-        Long l = randField > 3 ? null : Long.valueOf(r.nextLong());
-        Float f = randField > 4 ? null : Float.valueOf(r.nextFloat());
-        Double d = randField > 5 ? null : Double.valueOf(r.nextDouble());
-        String st = randField > 6 ? null : TestBinarySortableSerDe
-            .getRandString(r);
-	HiveDecimal bd = randField > 7 ? null : TestBinarySortableSerDe.getRandHiveDecimal(r);
-	      Date date = randField > 8 ? null : TestBinarySortableSerDe.getRandDate(r);
-        MyTestInnerStruct is = randField > 9 ? null : new MyTestInnerStruct(r
-            .nextInt(5) - 2, r.nextInt(5) - 2);
-        List<Integer> li = randField > 10 ? null : TestBinarySortableSerDe
-            .getRandIntegerArray(r);
-        byte[] ba = TestBinarySortableSerDe.getRandBA(r, i);
-        MyTestClass t = new MyTestClass(b, s, n, l, f, d, st, bd, date, is, li,ba);
+        MyTestClass t = new MyTestClass();
+        ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+        t.randomFill(r, extraTypeInfo);
         rows[i] = t;
       }
 

Modified: hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/MyTestClass.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/MyTestClass.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/MyTestClass.java (original)
+++ hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/MyTestClass.java Wed Apr 15 22:04:00 2015
@@ -18,40 +18,82 @@
 package org.apache.hadoop.hive.serde2.binarysortable;
 
 import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Random;
 
+import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.common.type.HiveDecimal;
+import org.apache.hadoop.hive.common.type.HiveIntervalDayTime;
+import org.apache.hadoop.hive.common.type.HiveIntervalYearMonth;
+import org.apache.hadoop.hive.common.type.HiveVarchar;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass.ExtraTypeInfo;
 
 public class MyTestClass {
-    Byte myByte;
-    Short myShort;
-    Integer myInt;
-    Long myLong;
-    Float myFloat;
-    Double myDouble;
-    String myString;
-    HiveDecimal myDecimal;
-    Date myDate;
-    MyTestInnerStruct myStruct;
-    List<Integer> myList;
-    byte[] myBA;
+
+    public Boolean myBool;
+    public Byte myByte;
+    public Short myShort;
+    public Integer myInt;
+    public Long myLong;
+    public Float myFloat;
+    public Double myDouble;
+    public String myString;
+    public HiveChar myHiveChar;
+    public HiveVarchar myHiveVarchar;
+    public byte[] myBinary;
+    public HiveDecimal myDecimal;
+    public Date myDate;
+    public Timestamp myTimestamp;
+    public HiveIntervalYearMonth myIntervalYearMonth;
+    public HiveIntervalDayTime myIntervalDayTime;
+
+    // Add more complex types.
+    public MyTestInnerStruct myStruct;
+    public  List<Integer> myList;
 
     public MyTestClass() {
     }
 
-    public MyTestClass(Byte b, Short s, Integer i, Long l, Float f, Double d,
-		       String st, HiveDecimal bd, Date date, MyTestInnerStruct is, List<Integer> li, byte[] ba) {
-	myByte = b;
-	myShort = s;
-	myInt = i;
-	myLong = l;
-	myFloat = f;
-	myDouble = d;
-	myString = st;
-	myDecimal = bd;
-	myDate = date;
-	myStruct = is;
-	myList = li;
-	myBA = ba;
+    public final static int fieldCount = 18;
+
+    public int randomFill(Random r, ExtraTypeInfo extraTypeInfo) {
+      int randField = r.nextInt(MyTestClass.fieldCount);
+      int field = 0;
+
+      myBool = (randField == field++) ? null : (r.nextInt(1) == 1);
+      myByte = (randField == field++) ? null : Byte.valueOf((byte) r.nextInt());
+      myShort = (randField == field++) ? null : Short.valueOf((short) r.nextInt());
+      myInt = (randField == field++) ? null : Integer.valueOf(r.nextInt());
+      myLong = (randField == field++) ? null : Long.valueOf(r.nextLong());
+      myFloat = (randField == field++) ? null : Float
+          .valueOf(r.nextFloat() * 10 - 5);
+      myDouble = (randField == field++) ? null : Double
+          .valueOf(r.nextDouble() * 10 - 5);
+      myString = (randField == field++) ? null : MyTestPrimitiveClass.getRandString(r);
+      myHiveChar = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveChar(r, extraTypeInfo);
+      myHiveVarchar = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveVarchar(r, extraTypeInfo);
+      myBinary = MyTestPrimitiveClass.getRandBinary(r, r.nextInt(1000));
+      myDecimal = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveDecimal(r, extraTypeInfo);
+      myDate = (randField == field++) ? null : MyTestPrimitiveClass.getRandDate(r);
+      myTimestamp = (randField == field++) ? null : MyTestPrimitiveClass.getRandTimestamp(r);
+      myIntervalYearMonth = (randField == field++) ? null : MyTestPrimitiveClass.getRandIntervalYearMonth(r);
+      myIntervalDayTime = (randField == field++) ? null : MyTestPrimitiveClass.getRandIntervalDayTime(r);
+
+      myStruct = (randField == field++) ? null : new MyTestInnerStruct(
+          r.nextInt(5) - 2, r.nextInt(5) - 2);
+      myList = (randField == field++) ? null : getRandIntegerArray(r);
+      return field;
+    }
+
+    public static List<Integer> getRandIntegerArray(Random r) {
+      int length = r.nextInt(10);
+      ArrayList<Integer> result = new ArrayList<Integer>(length);
+      for (int i = 0; i < length; i++) {
+        result.add(r.nextInt(128));
+      }
+      return result;
     }
+
 }

Modified: hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java (original)
+++ hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/binarysortable/TestBinarySortableSerDe.java Wed Apr 15 22:04:00 2015
@@ -26,11 +26,13 @@ import java.util.Random;
 
 import junit.framework.TestCase;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.common.type.HiveDecimal;
 import org.apache.hadoop.hive.serde.serdeConstants;
 import org.apache.hadoop.hive.serde2.SerDe;
 import org.apache.hadoop.hive.serde2.SerDeUtils;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass.ExtraTypeInfo;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.ObjectInspectorOptions;
@@ -64,7 +66,7 @@ public class TestBinarySortableSerDe ext
     return sb.toString();
   }
 
-  private SerDe getSerDe(String fieldNames, String fieldTypes, String order)
+  public static SerDe getSerDe(String fieldNames, String fieldTypes, String order)
       throws Throwable {
     Properties schema = new Properties();
     schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames);
@@ -124,7 +126,7 @@ public class TestBinarySortableSerDe ext
     }
   }
 
-  private void sort(Object[] structs, ObjectInspector oi) {
+  public static void sort(Object[] structs, ObjectInspector oi) {
     for (int i = 0; i < structs.length; i++) {
       for (int j = i + 1; j < structs.length; j++) {
         if (ObjectInspectorUtils.compare(structs[i], oi, structs[j], oi) > 0) {
@@ -136,66 +138,6 @@ public class TestBinarySortableSerDe ext
     }
   }
 
-  public static HiveDecimal getRandHiveDecimal(Random r) {
-    StringBuilder sb = new StringBuilder();
-    int l1 = 1+r.nextInt(18), l2 = r.nextInt(19);
-
-    if (r.nextBoolean()) {
-      sb.append("-");
-    }
-
-    sb.append(getRandString(r, DECIMAL_CHARS, l1));
-    if (l2 != 0) {
-      sb.append(".");
-      sb.append(getRandString(r, DECIMAL_CHARS, l2));
-    }
-
-    HiveDecimal bd = HiveDecimal.create(sb.toString());
-    return bd;
-  }
-
-  public static Date getRandDate(Random r) {
-    String dateStr = String.format("%d-%02d-%02d",
-        Integer.valueOf(1800 + r.nextInt(500)),  // year
-        Integer.valueOf(1 + r.nextInt(12)),      // month
-        Integer.valueOf(1 + r.nextInt(28)));     // day
-    Date dateVal = Date.valueOf(dateStr);
-    return dateVal;
-  }
-
-  public static String getRandString(Random r) {
-    return getRandString(r, null, r.nextInt(10));
-  }
-
-  public static String getRandString(Random r, String characters, int length) {
-    StringBuilder sb = new StringBuilder();
-    for (int i = 0; i < length; i++) {
-      if (characters == null) {
-        sb.append((char) (r.nextInt(128)));
-      } else {
-        sb.append(characters.charAt(r.nextInt(characters.length())));
-      }
-    }
-    return sb.toString();
-  }
-
-  public static List<Integer> getRandIntegerArray(Random r) {
-    int length = r.nextInt(10);
-    ArrayList<Integer> result = new ArrayList<Integer>(length);
-    for (int i = 0; i < length; i++) {
-      result.add(r.nextInt(128));
-    }
-    return result;
-  }
-
-  public static byte[] getRandBA(Random r, int len){
-    byte[] bytes = new byte[len];
-    for (int j = 0; j < len; j++){
-      bytes[j] = Byte.valueOf((byte) r.nextInt());
-    }
-    return bytes;
-  }
-
   public void testBinarySortableSerDe() throws Throwable {
     try {
 
@@ -206,23 +148,9 @@ public class TestBinarySortableSerDe ext
       MyTestClass rows[] = new MyTestClass[num];
 
       for (int i = 0; i < num; i++) {
-        int randField = r.nextInt(11);
         MyTestClass t = new MyTestClass();
-        t.myByte = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-        t.myShort = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-        t.myInt = randField > 2 ? null : Integer.valueOf(r.nextInt());
-        t.myLong = randField > 3 ? null : Long.valueOf(r.nextLong());
-        t.myFloat = randField > 4 ? null : Float
-            .valueOf(r.nextFloat() * 10 - 5);
-        t.myDouble = randField > 5 ? null : Double
-            .valueOf(r.nextDouble() * 10 - 5);
-        t.myString = randField > 6 ? null : getRandString(r);
-        t.myDecimal = randField > 7 ? null : getRandHiveDecimal(r);
-        t.myDate = randField > 8 ? null : getRandDate(r);
-        t.myStruct = randField > 9 ? null : new MyTestInnerStruct(
-            r.nextInt(5) - 2, r.nextInt(5) - 2);
-        t.myList = randField > 10 ? null : getRandIntegerArray(r);
-        t.myBA = getRandBA(r, i);
+        ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+        t.randomFill(r, extraTypeInfo);
         rows[i] = t;
       }
 
@@ -234,10 +162,13 @@ public class TestBinarySortableSerDe ext
       String fieldNames = ObjectInspectorUtils.getFieldNames(rowOI);
       String fieldTypes = ObjectInspectorUtils.getFieldTypes(rowOI);
 
+      String order;
+      order = StringUtils.leftPad("", MyTestClass.fieldCount, '+');
       testBinarySortableSerDe(rows, rowOI, getSerDe(fieldNames, fieldTypes,
-          "++++++++++++"), true);
+          order), true);
+      order = StringUtils.leftPad("", MyTestClass.fieldCount, '-');
       testBinarySortableSerDe(rows, rowOI, getSerDe(fieldNames, fieldTypes,
-          "------------"), false);
+          order), false);
 
       System.out.println("Test testTBinarySortableProtocol passed!");
     } catch (Throwable e) {

Modified: hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassBigger.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassBigger.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassBigger.java (original)
+++ hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassBigger.java Wed Apr 15 22:04:00 2015
@@ -18,49 +18,119 @@
 package org.apache.hadoop.hive.serde2.lazybinary;
 
 import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Random;
 
+import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.common.type.HiveDecimal;
+import org.apache.hadoop.hive.common.type.HiveIntervalDayTime;
+import org.apache.hadoop.hive.common.type.HiveIntervalYearMonth;
+import org.apache.hadoop.hive.common.type.HiveVarchar;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestClass;
 import org.apache.hadoop.hive.serde2.binarysortable.MyTestInnerStruct;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass;
+import org.apache.hadoop.hive.serde2.binarysortable.TestBinarySortableSerDe;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass.ExtraTypeInfo;
 
 /**
  * MyTestClassBigger.
  *
  */
 public class MyTestClassBigger {
-    Byte myByte;
-    Short myShort;
-    Integer myInt;
-    Long myLong;
-    Float myFloat;
-    Double myDouble;
-    String myString;
-    HiveDecimal myDecimal;
-    Date myDate;
-    MyTestInnerStruct myStruct;
-    List<Integer> myList;
-    byte[] myBA;
+
+    // The primitives.
+    public Boolean myBool;
+    public Byte myByte;
+    public Short myShort;
+    public Integer myInt;
+    public Long myLong;
+    public Float myFloat;
+    public Double myDouble;
+    public String myString;
+    public HiveChar myHiveChar;
+    public HiveVarchar myHiveVarchar;
+    public byte[] myBinary;
+    public HiveDecimal myDecimal;
+    public Date myDate;
+    public Timestamp myTimestamp;
+    public HiveIntervalYearMonth myIntervalYearMonth;
+    public HiveIntervalDayTime myIntervalDayTime;
+
+
+    // Add more complex types.
+    public MyTestInnerStruct myStruct;
+    public  List<Integer> myList;
+
+    // Bigger addition.
     Map<String, List<MyTestInnerStruct>> myMap;
 
+    public final static int mapPos = 18;
+
     public MyTestClassBigger() {
     }
 
-    public MyTestClassBigger(Byte b, Short s, Integer i, Long l, Float f,
-			     Double d, String st, HiveDecimal bd, Date date, MyTestInnerStruct is, List<Integer> li,
-			     byte[] ba, Map<String, List<MyTestInnerStruct>> mp) {
-	myByte = b;
-	myShort = s;
-	myInt = i;
-	myLong = l;
-	myFloat = f;
-	myDouble = d;
-	myString = st;
-	myDecimal = bd;
-	myDate = date;
-	myStruct = is;
-	myList = li;
-	myBA = ba;
-	myMap = mp;
+    public final static int biggerCount = 19;
+
+    public int randomFill(Random r, ExtraTypeInfo extraTypeInfo) {
+      int randField = r.nextInt(biggerCount);
+      int field = 0;
+      myBool = (randField == field++) ? null : (r.nextInt(1) == 1);
+      myByte = (randField == field++) ? null : Byte.valueOf((byte) r.nextInt());
+      myShort = (randField == field++) ? null : Short.valueOf((short) r.nextInt());
+      myInt = (randField == field++) ? null : Integer.valueOf(r.nextInt());
+      myLong = (randField == field++) ? null : Long.valueOf(r.nextLong());
+      myFloat = (randField == field++) ? null : Float
+          .valueOf(r.nextFloat() * 10 - 5);
+      myDouble = (randField == field++) ? null : Double
+          .valueOf(r.nextDouble() * 10 - 5);
+      myString = (randField == field++) ? null : MyTestPrimitiveClass.getRandString(r);
+      myHiveChar = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveChar(r, extraTypeInfo);
+      myHiveVarchar = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveVarchar(r, extraTypeInfo);
+      myBinary = MyTestPrimitiveClass.getRandBinary(r, r.nextInt(1000));
+      myDecimal = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveDecimal(r, extraTypeInfo);
+      myDate = (randField == field++) ? null : MyTestPrimitiveClass.getRandDate(r);
+      myTimestamp = (randField == field++) ? null : MyTestPrimitiveClass.getRandTimestamp(r);
+      myIntervalYearMonth = (randField == field++) ? null : MyTestPrimitiveClass.getRandIntervalYearMonth(r);
+      myIntervalDayTime = (randField == field++) ? null : MyTestPrimitiveClass.getRandIntervalDayTime(r);
+
+      myStruct = (randField == field++) ? null : new MyTestInnerStruct(
+          r.nextInt(5) - 2, r.nextInt(5) - 2);
+      myList = (randField == field++) ? null : MyTestClass.getRandIntegerArray(r);
+
+      Map<String, List<MyTestInnerStruct>> mp = new HashMap<String, List<MyTestInnerStruct>>();
+      String key = MyTestPrimitiveClass.getRandString(r);
+      List<MyTestInnerStruct> value = randField > 9 ? null
+          : getRandStructArray(r);
+      mp.put(key, value);
+      String key1 = MyTestPrimitiveClass.getRandString(r);
+      mp.put(key1, null);
+      String key2 = MyTestPrimitiveClass.getRandString(r);
+      List<MyTestInnerStruct> value2 = getRandStructArray(r);
+      mp.put(key2, value2);
+      myMap = mp;
+      return field;
     }
+
+    /**
+     * Generate a random struct array.
+     *
+     * @param r
+     *          random number generator
+     * @return an struct array
+     */
+    static List<MyTestInnerStruct> getRandStructArray(Random r) {
+      int length = r.nextInt(10);
+      ArrayList<MyTestInnerStruct> result = new ArrayList<MyTestInnerStruct>(
+          length);
+      for (int i = 0; i < length; i++) {
+        MyTestInnerStruct ti = new MyTestInnerStruct(r.nextInt(), r.nextInt());
+        result.add(ti);
+      }
+      return result;
+    }
+
 }

Modified: hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassSmaller.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassSmaller.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassSmaller.java (original)
+++ hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/MyTestClassSmaller.java Wed Apr 15 22:04:00 2015
@@ -18,36 +18,68 @@
 package org.apache.hadoop.hive.serde2.lazybinary;
 
 import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.Random;
 
+import org.apache.hadoop.hive.common.type.HiveChar;
 import org.apache.hadoop.hive.common.type.HiveDecimal;
+import org.apache.hadoop.hive.common.type.HiveIntervalDayTime;
+import org.apache.hadoop.hive.common.type.HiveIntervalYearMonth;
+import org.apache.hadoop.hive.common.type.HiveVarchar;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestClass;
 import org.apache.hadoop.hive.serde2.binarysortable.MyTestInnerStruct;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass.ExtraTypeInfo;
 
 public class MyTestClassSmaller {
-    Byte myByte;
-    Short myShort;
-    Integer myInt;
-    Long myLong;
-    Float myFloat;
-    Double myDouble;
-    String myString;
-    HiveDecimal myDecimal;
-    Date myDate;
+
+    public Boolean myBool;
+    public Byte myByte;
+    public Short myShort;
+    public Integer myInt;
+    public Long myLong;
+    public Float myFloat;
+    public Double myDouble;
+    public String myString;
+    public HiveChar myHiveChar;
+    public HiveVarchar myHiveVarchar;
+    public byte[] myBinary;
+    public HiveDecimal myDecimal;
+    public Date myDate;
+    public Timestamp myTimestamp;
+    public HiveIntervalYearMonth myIntervalYearMonth;
+    public HiveIntervalDayTime myIntervalDayTime;
+
     MyTestInnerStruct myStruct;
 
-    public MyTestClassSmaller() {
-    }
+    public final static int smallerCount = 17;
 
-    public MyTestClassSmaller(Byte b, Short s, Integer i, Long l, Float f,
-			      Double d, String st, HiveDecimal bd, Date date, MyTestInnerStruct is) {
-	myByte = b;
-	myShort = s;
-	myInt = i;
-	myLong = l;
-	myFloat = f;
-	myDouble = d;
-	myString = st;
-	myDecimal = bd;
-	myDate = date;
-	myStruct = is;
+    public int randomFill(Random r, ExtraTypeInfo extraTypeInfo) {
+      int randField = r.nextInt(smallerCount);
+      int field = 0;
+
+      myBool = (randField == field++) ? null : (r.nextInt(1) == 1);
+      myByte = (randField == field++) ? null : Byte.valueOf((byte) r.nextInt());
+      myShort = (randField == field++) ? null : Short.valueOf((short) r.nextInt());
+      myInt = (randField == field++) ? null : Integer.valueOf(r.nextInt());
+      myLong = (randField == field++) ? null : Long.valueOf(r.nextLong());
+      myFloat = (randField == field++) ? null : Float
+          .valueOf(r.nextFloat() * 10 - 5);
+      myDouble = (randField == field++) ? null : Double
+          .valueOf(r.nextDouble() * 10 - 5);
+      myString = (randField == field++) ? null : MyTestPrimitiveClass.getRandString(r);
+      myHiveChar = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveChar(r, extraTypeInfo);
+      myHiveVarchar = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveVarchar(r, extraTypeInfo);
+      myBinary = MyTestPrimitiveClass.getRandBinary(r, r.nextInt(1000));
+      myDecimal = (randField == field++) ? null : MyTestPrimitiveClass.getRandHiveDecimal(r, extraTypeInfo);
+      myDate = (randField == field++) ? null : MyTestPrimitiveClass.getRandDate(r);
+      myTimestamp = (randField == field++) ? null : MyTestPrimitiveClass.getRandTimestamp(r);
+      myIntervalYearMonth = (randField == field++) ? null : MyTestPrimitiveClass.getRandIntervalYearMonth(r);
+      myIntervalDayTime = (randField == field++) ? null : MyTestPrimitiveClass.getRandIntervalDayTime(r);
+
+      myStruct = (randField == field++) ? null : new MyTestInnerStruct(
+          r.nextInt(5) - 2, r.nextInt(5) - 2);
+      return field;
     }
+
 }

Modified: hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java (original)
+++ hive/branches/llap/serde/src/test/org/apache/hadoop/hive/serde2/lazybinary/TestLazyBinarySerDe.java Wed Apr 15 22:04:00 2015
@@ -36,7 +36,9 @@ import org.apache.hadoop.hive.serde2.Ser
 import org.apache.hadoop.hive.serde2.SerDeUtils;
 import org.apache.hadoop.hive.serde2.binarysortable.MyTestClass;
 import org.apache.hadoop.hive.serde2.binarysortable.MyTestInnerStruct;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass;
 import org.apache.hadoop.hive.serde2.binarysortable.TestBinarySortableSerDe;
+import org.apache.hadoop.hive.serde2.binarysortable.MyTestPrimitiveClass.ExtraTypeInfo;
 import org.apache.hadoop.hive.serde2.lazy.ByteArrayRef;
 import org.apache.hadoop.hive.serde2.lazy.LazyBinary;
 import org.apache.hadoop.hive.serde2.lazy.LazyFactory;
@@ -91,7 +93,7 @@ public class TestLazyBinarySerDe extends
    * @return the initialized LazyBinarySerDe
    * @throws Throwable
    */
-  private SerDe getSerDe(String fieldNames, String fieldTypes) throws Throwable {
+  protected static SerDe getSerDe(String fieldNames, String fieldTypes) throws Throwable {
     Properties schema = new Properties();
     schema.setProperty(serdeConstants.LIST_COLUMNS, fieldNames);
     schema.setProperty(serdeConstants.LIST_COLUMN_TYPES, fieldTypes);
@@ -194,46 +196,20 @@ public class TestLazyBinarySerDe extends
 
     int num = 100;
     for (int itest = 0; itest < num; itest++) {
-      int randField = r.nextInt(11);
-      Byte b = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-      Short s = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-      Integer n = randField > 2 ? null : Integer.valueOf(r.nextInt());
-      Long l = randField > 3 ? null : Long.valueOf(r.nextLong());
-      Float f = randField > 4 ? null : Float.valueOf(r.nextFloat());
-      Double d = randField > 5 ? null : Double.valueOf(r.nextDouble());
-      String st = randField > 6 ? null : TestBinarySortableSerDe
-          .getRandString(r);
-      HiveDecimal bd = randField > 7 ? null : TestBinarySortableSerDe.getRandHiveDecimal(r);
-      Date date = randField > 8 ? null : TestBinarySortableSerDe.getRandDate(r);
-      MyTestInnerStruct is = randField > 9 ? null : new MyTestInnerStruct(r
-          .nextInt(5) - 2, r.nextInt(5) - 2);
-      List<Integer> li = randField > 10 ? null : TestBinarySortableSerDe
-          .getRandIntegerArray(r);
-      byte[] ba  = TestBinarySortableSerDe.getRandBA(r, itest);
-      Map<String, List<MyTestInnerStruct>> mp = new HashMap<String, List<MyTestInnerStruct>>();
-      String key = TestBinarySortableSerDe.getRandString(r);
-      List<MyTestInnerStruct> value = randField > 9 ? null
-          : getRandStructArray(r);
-      mp.put(key, value);
-      String key1 = TestBinarySortableSerDe.getRandString(r);
-      mp.put(key1, null);
-      String key2 = TestBinarySortableSerDe.getRandString(r);
-      List<MyTestInnerStruct> value2 = getRandStructArray(r);
-      mp.put(key2, value2);
-
-      MyTestClassBigger input = new MyTestClassBigger(b, s, n, l, f, d, st, bd, date, is,
-          li, ba, mp);
-      BytesWritable bw = (BytesWritable) serde1.serialize(input, rowOI1);
+      MyTestClassBigger t = new MyTestClassBigger();
+      ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+      t.randomFill(r, extraTypeInfo);
+      BytesWritable bw = (BytesWritable) serde1.serialize(t, rowOI1);
       Object output = serde2.deserialize(bw);
 
-      if (0 != compareDiffSizedStructs(input, rowOI1, output, serdeOI2)) {
+      if (0 != compareDiffSizedStructs(t, rowOI1, output, serdeOI2)) {
         System.out.println("structs      = "
-            + SerDeUtils.getJSONString(input, rowOI1));
+            + SerDeUtils.getJSONString(t, rowOI1));
         System.out.println("deserialized = "
             + SerDeUtils.getJSONString(output, serdeOI2));
         System.out.println("serialized   = "
             + TestBinarySortableSerDe.hexString(bw));
-        assertEquals(input, output);
+        assertEquals(t, output);
       }
     }
   }
@@ -263,34 +239,20 @@ public class TestLazyBinarySerDe extends
 
     int num = 100;
     for (int itest = 0; itest < num; itest++) {
-      int randField = r.nextInt(12);
-      Byte b = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-      Short s = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-      Integer n = randField > 2 ? null : Integer.valueOf(r.nextInt());
-      Long l = randField > 3 ? null : Long.valueOf(r.nextLong());
-      Float f = randField > 4 ? null : Float.valueOf(r.nextFloat());
-      Double d = randField > 5 ? null : Double.valueOf(r.nextDouble());
-      String st = randField > 6 ? null : TestBinarySortableSerDe
-          .getRandString(r);
-      HiveDecimal bd = randField > 7 ? null : TestBinarySortableSerDe.getRandHiveDecimal(r);
-      Date date = randField > 8 ? null : TestBinarySortableSerDe.getRandDate(r);
-      MyTestInnerStruct is = randField > 9 ? null : new MyTestInnerStruct(r
-          .nextInt(5) - 2, r.nextInt(5) - 2);
-      List<Integer> li = randField > 10 ? null : TestBinarySortableSerDe
-          .getRandIntegerArray(r);
-      byte[] ba = TestBinarySortableSerDe.getRandBA(r, itest);
-      MyTestClass input = new MyTestClass(b, s, n, l, f, d, st, bd, date, is, li, ba);
-      BytesWritable bw = (BytesWritable) serde1.serialize(input, rowOI1);
+      MyTestClass t = new MyTestClass();
+      ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+      t.randomFill(r, extraTypeInfo);
+      BytesWritable bw = (BytesWritable) serde1.serialize(t, rowOI1);
       Object output = serde2.deserialize(bw);
 
-      if (0 != compareDiffSizedStructs(input, rowOI1, output, serdeOI2)) {
+      if (0 != compareDiffSizedStructs(t, rowOI1, output, serdeOI2)) {
         System.out.println("structs      = "
-            + SerDeUtils.getJSONString(input, rowOI1));
+            + SerDeUtils.getJSONString(t, rowOI1));
         System.out.println("deserialized = "
             + SerDeUtils.getJSONString(output, serdeOI2));
         System.out.println("serialized   = "
             + TestBinarySortableSerDe.hexString(bw));
-        assertEquals(input, output);
+        assertEquals(t, output);
       }
     }
   }
@@ -320,34 +282,21 @@ public class TestLazyBinarySerDe extends
 
     int num = 100;
     for (int itest = 0; itest < num; itest++) {
-      int randField = r.nextInt(12);
-      Byte b = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-      Short s = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-      Integer n = randField > 2 ? null : Integer.valueOf(r.nextInt());
-      Long l = randField > 3 ? null : Long.valueOf(r.nextLong());
-      Float f = randField > 4 ? null : Float.valueOf(r.nextFloat());
-      Double d = randField > 5 ? null : Double.valueOf(r.nextDouble());
-      String st = randField > 6 ? null : TestBinarySortableSerDe
-          .getRandString(r);
-      HiveDecimal bd = randField > 7 ? null : TestBinarySortableSerDe.getRandHiveDecimal(r);
-      Date date = randField > 8 ? null : TestBinarySortableSerDe.getRandDate(r);
-      MyTestInnerStruct is = randField > 9 ? null : new MyTestInnerStruct(r
-          .nextInt(5) - 2, r.nextInt(5) - 2);
-      List<Integer> li = randField > 10 ? null : TestBinarySortableSerDe
-          .getRandIntegerArray(r);
-      byte[] ba = TestBinarySortableSerDe.getRandBA(r, itest);
-      MyTestClass input = new MyTestClass(b, s, n, l, f, d, st, bd, date, is, li,ba);
-      BytesWritable bw = (BytesWritable) serde1.serialize(input, rowOI1);
+      MyTestClass t = new MyTestClass();
+      ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+      t.randomFill(r, extraTypeInfo);
+
+      BytesWritable bw = (BytesWritable) serde1.serialize(t, rowOI1);
       Object output = serde2.deserialize(bw);
 
-      if (0 != compareDiffSizedStructs(input, rowOI1, output, serdeOI2)) {
+      if (0 != compareDiffSizedStructs(t, rowOI1, output, serdeOI2)) {
         System.out.println("structs      = "
-            + SerDeUtils.getJSONString(input, rowOI1));
+            + SerDeUtils.getJSONString(t, rowOI1));
         System.out.println("deserialized = "
             + SerDeUtils.getJSONString(output, serdeOI2));
         System.out.println("serialized   = "
             + TestBinarySortableSerDe.hexString(bw));
-        assertEquals(input, output);
+        assertEquals(t, output);
       }
     }
   }
@@ -377,33 +326,20 @@ public class TestLazyBinarySerDe extends
 
     int num = 100;
     for (int itest = 0; itest < num; itest++) {
-      int randField = r.nextInt(9);
-      Byte b = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-      Short s = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-      Integer n = randField > 2 ? null : Integer.valueOf(r.nextInt());
-      Long l = randField > 3 ? null : Long.valueOf(r.nextLong());
-      Float f = randField > 4 ? null : Float.valueOf(r.nextFloat());
-      Double d = randField > 5 ? null : Double.valueOf(r.nextDouble());
-      String st = randField > 6 ? null : TestBinarySortableSerDe
-          .getRandString(r);
-      HiveDecimal bd = randField > 7 ? null : TestBinarySortableSerDe.getRandHiveDecimal(r);
-      Date date = randField > 7 ? null : TestBinarySortableSerDe.getRandDate(r);
-      MyTestInnerStruct is = randField > 7 ? null : new MyTestInnerStruct(r
-          .nextInt(5) - 2, r.nextInt(5) - 2);
-
-      MyTestClassSmaller input = new MyTestClassSmaller(b, s, n, l, f, d, st, bd, date,
-          is);
-      BytesWritable bw = (BytesWritable) serde1.serialize(input, rowOI1);
+      MyTestClassSmaller t = new MyTestClassSmaller();
+      ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+      t.randomFill(r, extraTypeInfo);
+      BytesWritable bw = (BytesWritable) serde1.serialize(t, rowOI1);
       Object output = serde2.deserialize(bw);
 
-      if (0 != compareDiffSizedStructs(input, rowOI1, output, serdeOI2)) {
+      if (0 != compareDiffSizedStructs(t, rowOI1, output, serdeOI2)) {
         System.out.println("structs      = "
-            + SerDeUtils.getJSONString(input, rowOI1));
+            + SerDeUtils.getJSONString(t, rowOI1));
         System.out.println("deserialized = "
             + SerDeUtils.getJSONString(output, serdeOI2));
         System.out.println("serialized   = "
             + TestBinarySortableSerDe.hexString(bw));
-        assertEquals(input, output);
+        assertEquals(t, output);
       }
     }
   }
@@ -421,13 +357,13 @@ public class TestLazyBinarySerDe extends
     StructObjectInspector soi1 = (StructObjectInspector) serdeOI;
     List<? extends StructField> fields1 = soi1.getAllStructFieldRefs();
     LazyBinaryMapObjectInspector lazympoi = (LazyBinaryMapObjectInspector) fields1
-        .get(12).getFieldObjectInspector();
+        .get(MyTestClassBigger.mapPos).getFieldObjectInspector();
     ObjectInspector lazympkeyoi = lazympoi.getMapKeyObjectInspector();
     ObjectInspector lazympvalueoi = lazympoi.getMapValueObjectInspector();
 
     StructObjectInspector soi2 = rowOI;
     List<? extends StructField> fields2 = soi2.getAllStructFieldRefs();
-    MapObjectInspector inputmpoi = (MapObjectInspector) fields2.get(12)
+    MapObjectInspector inputmpoi = (MapObjectInspector) fields2.get(MyTestClassBigger.mapPos)
         .getFieldObjectInspector();
     ObjectInspector inputmpkeyoi = inputmpoi.getMapKeyObjectInspector();
     ObjectInspector inputmpvalueoi = inputmpoi.getMapValueObjectInspector();
@@ -439,18 +375,19 @@ public class TestLazyBinarySerDe extends
 
       int randFields = r.nextInt(10);
       for (int i = 0; i < randFields; i++) {
-        String key = TestBinarySortableSerDe.getRandString(r);
+        String key = MyTestPrimitiveClass.getRandString(r);
         int randField = r.nextInt(10);
         List<MyTestInnerStruct> value = randField > 4 ? null
             : getRandStructArray(r);
         mp.put(key, value);
+
       }
 
-      MyTestClassBigger input = new MyTestClassBigger(null, null, null, null,
-						      null, null, null, null, null, null, null, null, mp);
-      BytesWritable bw = (BytesWritable) serde.serialize(input, rowOI);
+      MyTestClassBigger t = new MyTestClassBigger();
+      t.myMap = mp;
+      BytesWritable bw = (BytesWritable) serde.serialize(t, rowOI);
       Object output = serde.deserialize(bw);
-      Object lazyobj = soi1.getStructFieldData(output, fields1.get(12));
+      Object lazyobj = soi1.getStructFieldData(output, fields1.get(MyTestClassBigger.mapPos));
       Map<?, ?> outputmp = lazympoi.getMap(lazyobj);
 
       if (outputmp.size() != mp.size()) {
@@ -497,23 +434,9 @@ public class TestLazyBinarySerDe extends
       Random r = new Random(1234);
       MyTestClass rows[] = new MyTestClass[num];
       for (int i = 0; i < num; i++) {
-        int randField = r.nextInt(12);
-        Byte b = randField > 0 ? null : Byte.valueOf((byte) r.nextInt());
-        Short s = randField > 1 ? null : Short.valueOf((short) r.nextInt());
-        Integer n = randField > 2 ? null : Integer.valueOf(r.nextInt());
-        Long l = randField > 3 ? null : Long.valueOf(r.nextLong());
-        Float f = randField > 4 ? null : Float.valueOf(r.nextFloat());
-        Double d = randField > 5 ? null : Double.valueOf(r.nextDouble());
-        String st = randField > 6 ? null : TestBinarySortableSerDe
-            .getRandString(r);
-        HiveDecimal bd = randField > 7 ? null : TestBinarySortableSerDe.getRandHiveDecimal(r);
-        Date date = randField > 8 ? null : TestBinarySortableSerDe.getRandDate(r);
-        MyTestInnerStruct is = randField > 9 ? null : new MyTestInnerStruct(r
-            .nextInt(5) - 2, r.nextInt(5) - 2);
-        List<Integer> li = randField > 10 ? null : TestBinarySortableSerDe
-            .getRandIntegerArray(r);
-        byte[] ba = TestBinarySortableSerDe.getRandBA(r, i);
-        MyTestClass t = new MyTestClass(b, s, n, l, f, d, st, bd, date, is, li, ba);
+        MyTestClass t = new MyTestClass();
+        ExtraTypeInfo extraTypeInfo = new ExtraTypeInfo();
+        t.randomFill(r, extraTypeInfo);
         rows[i] = t;
       }
 

Modified: hive/branches/llap/service/if/TCLIService.thrift
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/if/TCLIService.thrift?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/if/TCLIService.thrift (original)
+++ hive/branches/llap/service/if/TCLIService.thrift Wed Apr 15 22:04:00 2015
@@ -57,6 +57,9 @@ enum TProtocolVersion {
 
   // V7 adds support for delegation token based connection
   HIVE_CLI_SERVICE_PROTOCOL_V7
+
+  // V8 adds support for interval types
+  HIVE_CLI_SERVICE_PROTOCOL_V8
 }
 
 enum TTypeId {
@@ -79,7 +82,9 @@ enum TTypeId {
   NULL_TYPE,
   DATE_TYPE,
   VARCHAR_TYPE,
-  CHAR_TYPE
+  CHAR_TYPE,
+  INTERVAL_YEAR_MONTH_TYPE,
+  INTERVAL_DAY_TIME_TYPE
 }
   
 const set<TTypeId> PRIMITIVE_TYPES = [
@@ -97,7 +102,9 @@ const set<TTypeId> PRIMITIVE_TYPES = [
   TTypeId.NULL_TYPE,
   TTypeId.DATE_TYPE,
   TTypeId.VARCHAR_TYPE,
-  TTypeId.CHAR_TYPE
+  TTypeId.CHAR_TYPE,
+  TTypeId.INTERVAL_YEAR_MONTH_TYPE,
+  TTypeId.INTERVAL_DAY_TIME_TYPE
 ]
 
 const set<TTypeId> COMPLEX_TYPES = [
@@ -133,6 +140,8 @@ const map<TTypeId,string> TYPE_NAMES = {
   TTypeId.DATE_TYPE: "DATE"
   TTypeId.VARCHAR_TYPE: "VARCHAR"
   TTypeId.CHAR_TYPE: "CHAR"
+  TTypeId.INTERVAL_YEAR_MONTH_TYPE: "INTERVAL_YEAR_MONTH"
+  TTypeId.INTERVAL_DAY_TIME_TYPE: "INTERVAL_DAY_TIME"
 }
 
 // Thrift does not support recursively defined types or forward declarations,
@@ -323,7 +332,7 @@ union TColumnValue {
   4: TI32Value    i32Val       // INT
   5: TI64Value    i64Val       // BIGINT, TIMESTAMP
   6: TDoubleValue doubleVal    // FLOAT, DOUBLE
-  7: TStringValue stringVal    // STRING, LIST, MAP, STRUCT, UNIONTYPE, BINARY, DECIMAL, NULL
+  7: TStringValue stringVal    // STRING, LIST, MAP, STRUCT, UNIONTYPE, BINARY, DECIMAL, NULL, INTERVAL_YEAR_MONTH, INTERVAL_DAY_TIME
 }
 
 // Represents a row in a rowset.
@@ -542,7 +551,7 @@ struct TOperationHandle {
 // which operations may be executed.
 struct TOpenSessionReq {
   // The version of the HiveServer2 protocol that the client is using.
-  1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7
+  1: required TProtocolVersion client_protocol = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8
 
   // Username and password for authentication.
   // Depending on the authentication scheme being used,
@@ -561,7 +570,7 @@ struct TOpenSessionResp {
   1: required TStatus status
 
   // The protocol version that the server is using.
-  2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7
+  2: required TProtocolVersion serverProtocolVersion = TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8
 
   // Session Handle
   3: optional TSessionHandle sessionHandle

Modified: hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp Wed Apr 15 22:04:00 2015
@@ -26,6 +26,8 @@ TCLIServiceConstants::TCLIServiceConstan
   PRIMITIVE_TYPES.insert((TTypeId::type)17);
   PRIMITIVE_TYPES.insert((TTypeId::type)18);
   PRIMITIVE_TYPES.insert((TTypeId::type)19);
+  PRIMITIVE_TYPES.insert((TTypeId::type)20);
+  PRIMITIVE_TYPES.insert((TTypeId::type)21);
 
   COMPLEX_TYPES.insert((TTypeId::type)10);
   COMPLEX_TYPES.insert((TTypeId::type)11);
@@ -55,6 +57,8 @@ TCLIServiceConstants::TCLIServiceConstan
   TYPE_NAMES.insert(std::make_pair((TTypeId::type)17, "DATE"));
   TYPE_NAMES.insert(std::make_pair((TTypeId::type)18, "VARCHAR"));
   TYPE_NAMES.insert(std::make_pair((TTypeId::type)19, "CHAR"));
+  TYPE_NAMES.insert(std::make_pair((TTypeId::type)20, "INTERVAL_YEAR_MONTH"));
+  TYPE_NAMES.insert(std::make_pair((TTypeId::type)21, "INTERVAL_DAY_TIME"));
 
   CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength";
 

Modified: hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp Wed Apr 15 22:04:00 2015
@@ -17,7 +17,8 @@ int _kTProtocolVersionValues[] = {
   TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V4,
   TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V5,
   TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V6,
-  TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V7
+  TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V7,
+  TProtocolVersion::HIVE_CLI_SERVICE_PROTOCOL_V8
 };
 const char* _kTProtocolVersionNames[] = {
   "HIVE_CLI_SERVICE_PROTOCOL_V1",
@@ -26,9 +27,10 @@ const char* _kTProtocolVersionNames[] =
   "HIVE_CLI_SERVICE_PROTOCOL_V4",
   "HIVE_CLI_SERVICE_PROTOCOL_V5",
   "HIVE_CLI_SERVICE_PROTOCOL_V6",
-  "HIVE_CLI_SERVICE_PROTOCOL_V7"
+  "HIVE_CLI_SERVICE_PROTOCOL_V7",
+  "HIVE_CLI_SERVICE_PROTOCOL_V8"
 };
-const std::map<int, const char*> _TProtocolVersion_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kTProtocolVersionValues, _kTProtocolVersionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _TProtocolVersion_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kTProtocolVersionValues, _kTProtocolVersionNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
 int _kTTypeIdValues[] = {
   TTypeId::BOOLEAN_TYPE,
@@ -50,7 +52,9 @@ int _kTTypeIdValues[] = {
   TTypeId::NULL_TYPE,
   TTypeId::DATE_TYPE,
   TTypeId::VARCHAR_TYPE,
-  TTypeId::CHAR_TYPE
+  TTypeId::CHAR_TYPE,
+  TTypeId::INTERVAL_YEAR_MONTH_TYPE,
+  TTypeId::INTERVAL_DAY_TIME_TYPE
 };
 const char* _kTTypeIdNames[] = {
   "BOOLEAN_TYPE",
@@ -72,9 +76,11 @@ const char* _kTTypeIdNames[] = {
   "NULL_TYPE",
   "DATE_TYPE",
   "VARCHAR_TYPE",
-  "CHAR_TYPE"
+  "CHAR_TYPE",
+  "INTERVAL_YEAR_MONTH_TYPE",
+  "INTERVAL_DAY_TIME_TYPE"
 };
-const std::map<int, const char*> _TTypeId_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(20, _kTTypeIdValues, _kTTypeIdNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _TTypeId_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(22, _kTTypeIdValues, _kTTypeIdNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
 
 int _kTStatusCodeValues[] = {
   TStatusCode::SUCCESS_STATUS,

Modified: hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.h
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.h?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.h (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-cpp/TCLIService_types.h Wed Apr 15 22:04:00 2015
@@ -24,7 +24,8 @@ struct TProtocolVersion {
     HIVE_CLI_SERVICE_PROTOCOL_V4 = 3,
     HIVE_CLI_SERVICE_PROTOCOL_V5 = 4,
     HIVE_CLI_SERVICE_PROTOCOL_V6 = 5,
-    HIVE_CLI_SERVICE_PROTOCOL_V7 = 6
+    HIVE_CLI_SERVICE_PROTOCOL_V7 = 6,
+    HIVE_CLI_SERVICE_PROTOCOL_V8 = 7
   };
 };
 
@@ -51,7 +52,9 @@ struct TTypeId {
     NULL_TYPE = 16,
     DATE_TYPE = 17,
     VARCHAR_TYPE = 18,
-    CHAR_TYPE = 19
+    CHAR_TYPE = 19,
+    INTERVAL_YEAR_MONTH_TYPE = 20,
+    INTERVAL_DAY_TIME_TYPE = 21
   };
 };
 
@@ -1946,8 +1949,8 @@ class TOpenSessionReq {
   static const char* ascii_fingerprint; // = "C8FD0F306A16C16BDA7B57F58BFAE5B2";
   static const uint8_t binary_fingerprint[16]; // = {0xC8,0xFD,0x0F,0x30,0x6A,0x16,0xC1,0x6B,0xDA,0x7B,0x57,0xF5,0x8B,0xFA,0xE5,0xB2};
 
-  TOpenSessionReq() : client_protocol((TProtocolVersion::type)6), username(), password() {
-    client_protocol = (TProtocolVersion::type)6;
+  TOpenSessionReq() : client_protocol((TProtocolVersion::type)7), username(), password() {
+    client_protocol = (TProtocolVersion::type)7;
 
   }
 
@@ -2022,8 +2025,8 @@ class TOpenSessionResp {
   static const char* ascii_fingerprint; // = "CFE7D7F4E9EC671F2518ED74FEE9F163";
   static const uint8_t binary_fingerprint[16]; // = {0xCF,0xE7,0xD7,0xF4,0xE9,0xEC,0x67,0x1F,0x25,0x18,0xED,0x74,0xFE,0xE9,0xF1,0x63};
 
-  TOpenSessionResp() : serverProtocolVersion((TProtocolVersion::type)6) {
-    serverProtocolVersion = (TProtocolVersion::type)6;
+  TOpenSessionResp() : serverProtocolVersion((TProtocolVersion::type)7) {
+    serverProtocolVersion = (TProtocolVersion::type)7;
 
   }
 

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java Wed Apr 15 22:04:00 2015
@@ -3023,7 +3023,7 @@ public class ThriftHive {
                   struct.success = new ArrayList<String>(_list0.size);
                   for (int _i1 = 0; _i1 < _list0.size; ++_i1)
                   {
-                    String _elem2; // required
+                    String _elem2; // optional
                     _elem2 = iprot.readString();
                     struct.success.add(_elem2);
                   }
@@ -3122,7 +3122,7 @@ public class ThriftHive {
             struct.success = new ArrayList<String>(_list5.size);
             for (int _i6 = 0; _i6 < _list5.size; ++_i6)
             {
-              String _elem7; // required
+              String _elem7; // optional
               _elem7 = iprot.readString();
               struct.success.add(_elem7);
             }
@@ -3785,7 +3785,7 @@ public class ThriftHive {
                   struct.success = new ArrayList<String>(_list8.size);
                   for (int _i9 = 0; _i9 < _list8.size; ++_i9)
                   {
-                    String _elem10; // required
+                    String _elem10; // optional
                     _elem10 = iprot.readString();
                     struct.success.add(_elem10);
                   }
@@ -3884,7 +3884,7 @@ public class ThriftHive {
             struct.success = new ArrayList<String>(_list13.size);
             for (int _i14 = 0; _i14 < _list13.size; ++_i14)
             {
-              String _elem15; // required
+              String _elem15; // optional
               _elem15 = iprot.readString();
               struct.success.add(_elem15);
             }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBinaryColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBinaryColumn.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBinaryColumn.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBinaryColumn.java Wed Apr 15 22:04:00 2015
@@ -451,7 +451,7 @@ public class TBinaryColumn implements or
                 struct.values = new ArrayList<ByteBuffer>(_list110.size);
                 for (int _i111 = 0; _i111 < _list110.size; ++_i111)
                 {
-                  ByteBuffer _elem112; // required
+                  ByteBuffer _elem112; // optional
                   _elem112 = iprot.readBinary();
                   struct.values.add(_elem112);
                 }
@@ -535,7 +535,7 @@ public class TBinaryColumn implements or
         struct.values = new ArrayList<ByteBuffer>(_list115.size);
         for (int _i116 = 0; _i116 < _list115.size; ++_i116)
         {
-          ByteBuffer _elem117; // required
+          ByteBuffer _elem117; // optional
           _elem117 = iprot.readBinary();
           struct.values.add(_elem117);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBoolColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBoolColumn.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBoolColumn.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TBoolColumn.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TBoolColumn implements org.
                 struct.values = new ArrayList<Boolean>(_list54.size);
                 for (int _i55 = 0; _i55 < _list54.size; ++_i55)
                 {
-                  boolean _elem56; // required
+                  boolean _elem56; // optional
                   _elem56 = iprot.readBool();
                   struct.values.add(_elem56);
                 }
@@ -533,7 +533,7 @@ public class TBoolColumn implements org.
         struct.values = new ArrayList<Boolean>(_list59.size);
         for (int _i60 = 0; _i60 < _list59.size; ++_i60)
         {
-          boolean _elem61; // required
+          boolean _elem61; // optional
           _elem61 = iprot.readBool();
           struct.values.add(_elem61);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TByteColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TByteColumn.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TByteColumn.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TByteColumn.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TByteColumn implements org.
                 struct.values = new ArrayList<Byte>(_list62.size);
                 for (int _i63 = 0; _i63 < _list62.size; ++_i63)
                 {
-                  byte _elem64; // required
+                  byte _elem64; // optional
                   _elem64 = iprot.readByte();
                   struct.values.add(_elem64);
                 }
@@ -533,7 +533,7 @@ public class TByteColumn implements org.
         struct.values = new ArrayList<Byte>(_list67.size);
         for (int _i68 = 0; _i68 < _list67.size; ++_i68)
         {
-          byte _elem69; // required
+          byte _elem69; // optional
           _elem69 = iprot.readByte();
           struct.values.add(_elem69);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java Wed Apr 15 22:04:00 2015
@@ -50,6 +50,8 @@ public class TCLIServiceConstants {
     PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.DATE_TYPE);
     PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.VARCHAR_TYPE);
     PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.CHAR_TYPE);
+    PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_YEAR_MONTH_TYPE);
+    PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_DAY_TIME_TYPE);
   }
 
   public static final Set<TTypeId> COMPLEX_TYPES = new HashSet<TTypeId>();
@@ -88,6 +90,8 @@ public class TCLIServiceConstants {
     TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.DATE_TYPE, "DATE");
     TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.VARCHAR_TYPE, "VARCHAR");
     TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.CHAR_TYPE, "CHAR");
+    TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_YEAR_MONTH_TYPE, "INTERVAL_YEAR_MONTH");
+    TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.INTERVAL_DAY_TIME_TYPE, "INTERVAL_DAY_TIME");
   }
 
   public static final String CHARACTER_MAXIMUM_LENGTH = "characterMaximumLength";

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TDoubleColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TDoubleColumn.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TDoubleColumn.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TDoubleColumn.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TDoubleColumn implements or
                 struct.values = new ArrayList<Double>(_list94.size);
                 for (int _i95 = 0; _i95 < _list94.size; ++_i95)
                 {
-                  double _elem96; // required
+                  double _elem96; // optional
                   _elem96 = iprot.readDouble();
                   struct.values.add(_elem96);
                 }
@@ -533,7 +533,7 @@ public class TDoubleColumn implements or
         struct.values = new ArrayList<Double>(_list99.size);
         for (int _i100 = 0; _i100 < _list99.size; ++_i100)
         {
-          double _elem101; // required
+          double _elem101; // optional
           _elem101 = iprot.readDouble();
           struct.values.add(_elem101);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetTablesReq.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetTablesReq.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetTablesReq.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetTablesReq.java Wed Apr 15 22:04:00 2015
@@ -715,7 +715,7 @@ public class TGetTablesReq implements or
                 struct.tableTypes = new ArrayList<String>(_list172.size);
                 for (int _i173 = 0; _i173 < _list172.size; ++_i173)
                 {
-                  String _elem174; // required
+                  String _elem174; // optional
                   _elem174 = iprot.readString();
                   struct.tableTypes.add(_elem174);
                 }
@@ -856,7 +856,7 @@ public class TGetTablesReq implements or
           struct.tableTypes = new ArrayList<String>(_list177.size);
           for (int _i178 = 0; _i178 < _list177.size; ++_i178)
           {
-            String _elem179; // required
+            String _elem179; // optional
             _elem179 = iprot.readString();
             struct.tableTypes.add(_elem179);
           }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI16Column.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI16Column.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI16Column.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI16Column.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TI16Column implements org.a
                 struct.values = new ArrayList<Short>(_list70.size);
                 for (int _i71 = 0; _i71 < _list70.size; ++_i71)
                 {
-                  short _elem72; // required
+                  short _elem72; // optional
                   _elem72 = iprot.readI16();
                   struct.values.add(_elem72);
                 }
@@ -533,7 +533,7 @@ public class TI16Column implements org.a
         struct.values = new ArrayList<Short>(_list75.size);
         for (int _i76 = 0; _i76 < _list75.size; ++_i76)
         {
-          short _elem77; // required
+          short _elem77; // optional
           _elem77 = iprot.readI16();
           struct.values.add(_elem77);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI32Column.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI32Column.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI32Column.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI32Column.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TI32Column implements org.a
                 struct.values = new ArrayList<Integer>(_list78.size);
                 for (int _i79 = 0; _i79 < _list78.size; ++_i79)
                 {
-                  int _elem80; // required
+                  int _elem80; // optional
                   _elem80 = iprot.readI32();
                   struct.values.add(_elem80);
                 }
@@ -533,7 +533,7 @@ public class TI32Column implements org.a
         struct.values = new ArrayList<Integer>(_list83.size);
         for (int _i84 = 0; _i84 < _list83.size; ++_i84)
         {
-          int _elem85; // required
+          int _elem85; // optional
           _elem85 = iprot.readI32();
           struct.values.add(_elem85);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI64Column.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI64Column.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI64Column.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TI64Column.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TI64Column implements org.a
                 struct.values = new ArrayList<Long>(_list86.size);
                 for (int _i87 = 0; _i87 < _list86.size; ++_i87)
                 {
-                  long _elem88; // required
+                  long _elem88; // optional
                   _elem88 = iprot.readI64();
                   struct.values.add(_elem88);
                 }
@@ -533,7 +533,7 @@ public class TI64Column implements org.a
         struct.values = new ArrayList<Long>(_list91.size);
         for (int _i92 = 0; _i92 < _list91.size; ++_i92)
         {
-          long _elem93; // required
+          long _elem93; // optional
           _elem93 = iprot.readI64();
           struct.values.add(_elem93);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionReq.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionReq.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionReq.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionReq.java Wed Apr 15 22:04:00 2015
@@ -141,7 +141,7 @@ public class TOpenSessionReq implements
   }
 
   public TOpenSessionReq() {
-    this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7;
+    this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
 
   }
 
@@ -188,7 +188,7 @@ public class TOpenSessionReq implements
 
   @Override
   public void clear() {
-    this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7;
+    this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
 
     this.username = null;
     this.password = null;

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TOpenSessionResp.java Wed Apr 15 22:04:00 2015
@@ -141,7 +141,7 @@ public class TOpenSessionResp implements
   }
 
   public TOpenSessionResp() {
-    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7;
+    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
 
   }
 
@@ -191,7 +191,7 @@ public class TOpenSessionResp implements
   @Override
   public void clear() {
     this.status = null;
-    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V7;
+    this.serverProtocolVersion = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
 
     this.sessionHandle = null;
     this.configuration = null;

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TProtocolVersion.java Wed Apr 15 22:04:00 2015
@@ -18,7 +18,8 @@ public enum TProtocolVersion implements
   HIVE_CLI_SERVICE_PROTOCOL_V4(3),
   HIVE_CLI_SERVICE_PROTOCOL_V5(4),
   HIVE_CLI_SERVICE_PROTOCOL_V6(5),
-  HIVE_CLI_SERVICE_PROTOCOL_V7(6);
+  HIVE_CLI_SERVICE_PROTOCOL_V7(6),
+  HIVE_CLI_SERVICE_PROTOCOL_V8(7);
 
   private final int value;
 
@@ -53,6 +54,8 @@ public enum TProtocolVersion implements
         return HIVE_CLI_SERVICE_PROTOCOL_V6;
       case 6:
         return HIVE_CLI_SERVICE_PROTOCOL_V7;
+      case 7:
+        return HIVE_CLI_SERVICE_PROTOCOL_V8;
       default:
         return null;
     }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRow.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRow.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRow.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRow.java Wed Apr 15 22:04:00 2015
@@ -354,7 +354,7 @@ public class TRow implements org.apache.
                 struct.colVals = new ArrayList<TColumnValue>(_list46.size);
                 for (int _i47 = 0; _i47 < _list46.size; ++_i47)
                 {
-                  TColumnValue _elem48; // required
+                  TColumnValue _elem48; // optional
                   _elem48 = new TColumnValue();
                   _elem48.read(iprot);
                   struct.colVals.add(_elem48);
@@ -425,7 +425,7 @@ public class TRow implements org.apache.
         struct.colVals = new ArrayList<TColumnValue>(_list51.size);
         for (int _i52 = 0; _i52 < _list51.size; ++_i52)
         {
-          TColumnValue _elem53; // required
+          TColumnValue _elem53; // optional
           _elem53 = new TColumnValue();
           _elem53.read(iprot);
           struct.colVals.add(_elem53);

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRowSet.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRowSet.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRowSet.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TRowSet.java Wed Apr 15 22:04:00 2015
@@ -549,7 +549,7 @@ public class TRowSet implements org.apac
                 struct.rows = new ArrayList<TRow>(_list118.size);
                 for (int _i119 = 0; _i119 < _list118.size; ++_i119)
                 {
-                  TRow _elem120; // required
+                  TRow _elem120; // optional
                   _elem120 = new TRow();
                   _elem120.read(iprot);
                   struct.rows.add(_elem120);
@@ -568,7 +568,7 @@ public class TRowSet implements org.apac
                 struct.columns = new ArrayList<TColumn>(_list121.size);
                 for (int _i122 = 0; _i122 < _list121.size; ++_i122)
                 {
-                  TColumn _elem123; // required
+                  TColumn _elem123; // optional
                   _elem123 = new TColumn();
                   _elem123.read(iprot);
                   struct.columns.add(_elem123);
@@ -673,7 +673,7 @@ public class TRowSet implements org.apac
         struct.rows = new ArrayList<TRow>(_list128.size);
         for (int _i129 = 0; _i129 < _list128.size; ++_i129)
         {
-          TRow _elem130; // required
+          TRow _elem130; // optional
           _elem130 = new TRow();
           _elem130.read(iprot);
           struct.rows.add(_elem130);
@@ -687,7 +687,7 @@ public class TRowSet implements org.apac
           struct.columns = new ArrayList<TColumn>(_list131.size);
           for (int _i132 = 0; _i132 < _list131.size; ++_i132)
           {
-            TColumn _elem133; // required
+            TColumn _elem133; // optional
             _elem133 = new TColumn();
             _elem133.read(iprot);
             struct.columns.add(_elem133);

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStatus.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStatus.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStatus.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStatus.java Wed Apr 15 22:04:00 2015
@@ -698,7 +698,7 @@ public class TStatus implements org.apac
                 struct.infoMessages = new ArrayList<String>(_list134.size);
                 for (int _i135 = 0; _i135 < _list134.size; ++_i135)
                 {
-                  String _elem136; // required
+                  String _elem136; // optional
                   _elem136 = iprot.readString();
                   struct.infoMessages.add(_elem136);
                 }
@@ -848,7 +848,7 @@ public class TStatus implements org.apac
           struct.infoMessages = new ArrayList<String>(_list139.size);
           for (int _i140 = 0; _i140 < _list139.size; ++_i140)
           {
-            String _elem141; // required
+            String _elem141; // optional
             _elem141 = iprot.readString();
             struct.infoMessages.add(_elem141);
           }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStringColumn.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStringColumn.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStringColumn.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TStringColumn.java Wed Apr 15 22:04:00 2015
@@ -449,7 +449,7 @@ public class TStringColumn implements or
                 struct.values = new ArrayList<String>(_list102.size);
                 for (int _i103 = 0; _i103 < _list102.size; ++_i103)
                 {
-                  String _elem104; // required
+                  String _elem104; // optional
                   _elem104 = iprot.readString();
                   struct.values.add(_elem104);
                 }
@@ -533,7 +533,7 @@ public class TStringColumn implements or
         struct.values = new ArrayList<String>(_list107.size);
         for (int _i108 = 0; _i108 < _list107.size; ++_i108)
         {
-          String _elem109; // required
+          String _elem109; // optional
           _elem109 = iprot.readString();
           struct.values.add(_elem109);
         }

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTableSchema.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTableSchema.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTableSchema.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTableSchema.java Wed Apr 15 22:04:00 2015
@@ -354,7 +354,7 @@ public class TTableSchema implements org
                 struct.columns = new ArrayList<TColumnDesc>(_list38.size);
                 for (int _i39 = 0; _i39 < _list38.size; ++_i39)
                 {
-                  TColumnDesc _elem40; // required
+                  TColumnDesc _elem40; // optional
                   _elem40 = new TColumnDesc();
                   _elem40.read(iprot);
                   struct.columns.add(_elem40);
@@ -425,7 +425,7 @@ public class TTableSchema implements org
         struct.columns = new ArrayList<TColumnDesc>(_list43.size);
         for (int _i44 = 0; _i44 < _list43.size; ++_i44)
         {
-          TColumnDesc _elem45; // required
+          TColumnDesc _elem45; // optional
           _elem45 = new TColumnDesc();
           _elem45.read(iprot);
           struct.columns.add(_elem45);

Modified: hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeDesc.java
URL: http://svn.apache.org/viewvc/hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeDesc.java?rev=1673969&r1=1673968&r2=1673969&view=diff
==============================================================================
--- hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeDesc.java (original)
+++ hive/branches/llap/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeDesc.java Wed Apr 15 22:04:00 2015
@@ -354,7 +354,7 @@ public class TTypeDesc implements org.ap
                 struct.types = new ArrayList<TTypeEntry>(_list30.size);
                 for (int _i31 = 0; _i31 < _list30.size; ++_i31)
                 {
-                  TTypeEntry _elem32; // required
+                  TTypeEntry _elem32; // optional
                   _elem32 = new TTypeEntry();
                   _elem32.read(iprot);
                   struct.types.add(_elem32);
@@ -425,7 +425,7 @@ public class TTypeDesc implements org.ap
         struct.types = new ArrayList<TTypeEntry>(_list35.size);
         for (int _i36 = 0; _i36 < _list35.size; ++_i36)
         {
-          TTypeEntry _elem37; // required
+          TTypeEntry _elem37; // optional
           _elem37 = new TTypeEntry();
           _elem37.read(iprot);
           struct.types.add(_elem37);



Mime
View raw message