FAQ
Author: hashutosh
Date: Fri Jun 21 02:27:15 2013
New Revision: 1495273

URL: http://svn.apache.org/r1495273
Log:
HIVE-4172 : JDBC2 does not support VOID type (Navis via Ashutosh Chauhan)

Added:
     hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyVoid.java
Modified:
     hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
     hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java
     hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java
     hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
     hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
     hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedValueList.java
     hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
     hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java
     hive/trunk/service/if/TCLIService.thrift
     hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp
     hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp
     hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.h
     hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java
     hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java
     hive/trunk/service/src/gen/thrift/gen-py/TCLIService/constants.py
     hive/trunk/service/src/gen/thrift/gen-py/TCLIService/ttypes.py
     hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb
     hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
     hive/trunk/service/src/java/org/apache/hive/service/cli/ColumnValue.java
     hive/trunk/service/src/java/org/apache/hive/service/cli/Row.java
     hive/trunk/service/src/java/org/apache/hive/service/cli/Type.java

Modified: hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java (original)
+++ hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveBaseResultSet.java Fri Jun 21 02:27:15 2013
@@ -499,6 +499,9 @@ public abstract class HiveBaseResultSet
        return getTimestampValue(tColumnValue.getStringVal());
      case DECIMAL_TYPE:
        return getBigDecimalValue(tColumnValue.getStringVal());
+ case NULL_TYPE:
+ wasNull = true;
+ return null;
      default:
        throw new SQLException("Unrecognized column type:" + columnType);
      }

Modified: hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java (original)
+++ hive/trunk/jdbc/src/java/org/apache/hive/jdbc/HiveResultSetMetaData.java Fri Jun 21 02:27:15 2013
@@ -116,6 +116,8 @@ public class HiveResultSetMetaData imple
        return serdeConstants.DECIMAL_TYPE_NAME;
      } else if ("binary".equalsIgnoreCase(type)) {
        return serdeConstants.BINARY_TYPE_NAME;
+ } else if ("void".equalsIgnoreCase(type)) {
+ return serdeConstants.VOID_TYPE_NAME;
      } else if (type.startsWith("map<")) {
        return serdeConstants.STRING_TYPE_NAME;
      } else if (type.startsWith("array<")) {

Modified: hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java (original)
+++ hive/trunk/jdbc/src/test/org/apache/hadoop/hive/jdbc/TestJdbcDriver.java Fri Jun 21 02:27:15 2013
@@ -392,6 +392,17 @@ public class TestJdbcDriver extends Test
      doTestSelectAll(tableName, 100, 20);
    }

+ public void testNullType() throws Exception {
+ Statement stmt = con.createStatement();
+ try {
+ ResultSet res = stmt.executeQuery("select null from " + dataTypeTableName);
+ assertTrue(res.next());
+ assertNull(res.getObject(1));
+ } finally {
+ stmt.close();
+ }
+ }
+
    public void testDataTypes() throws Exception {
      Statement stmt = con.createStatement();


Modified: hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java
URL: http://svn.apache.org/viewvc/hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java (original)
+++ hive/trunk/jdbc/src/test/org/apache/hive/jdbc/TestJdbcDriver2.java Fri Jun 21 02:27:15 2013
@@ -383,6 +383,17 @@ public class TestJdbcDriver2 extends Tes
      doTestSelectAll(tableName, 100, 20);
    }

+ public void testNullType() throws Exception {
+ Statement stmt = con.createStatement();
+ try {
+ ResultSet res = stmt.executeQuery("select null from " + dataTypeTableName);
+ assertTrue(res.next());
+ assertNull(res.getObject(1));
+ } finally {
+ stmt.close();
+ }
+ }
+
    public void testDataTypes() throws Exception {
      Statement stmt = con.createStatement();


Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedInfo.java Fri Jun 21 02:27:15 2013
@@ -125,7 +125,7 @@ public class SkewedInfo implements org.a
                  new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))));
      tmpMap.put(_Fields.SKEWED_COL_VALUE_LOCATION_MAPS, new org.apache.thrift.meta_data.FieldMetaData("skewedColValueLocationMaps", org.apache.thrift.TFieldRequirementType.DEFAULT,
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SkewedValueList.class),
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SkewedValueList.class),
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SkewedInfo.class, metaDataMap);

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedValueList.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedValueList.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedValueList.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SkewedValueList.java Fri Jun 21 02:27:15 2013
@@ -106,8 +106,8 @@ public class SkewedValueList implements
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SKEWED_VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("skewedValueList", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ tmpMap.put(_Fields.SKEWED_VALUE_LIST, new org.apache.thrift.meta_data.FieldMetaData("skewedValueList", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SkewedValueList.class, metaDataMap);
@@ -339,7 +339,7 @@ public class SkewedValueList implements
        while (true)
        {
          schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
            break;
          }
          switch (schemeField.id) {
@@ -357,7 +357,7 @@ public class SkewedValueList implements
                  iprot.readListEnd();
                }
                struct.setSkewedValueListIsSet(true);
- } else {
+ } else {
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;

Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java Fri Jun 21 02:27:15 2013
@@ -47102,17 +47102,17 @@ public class ThriftHiveMetastore {
      public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
      static {
        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ tmpMap.put(_Fields.PARTITION_SPECS, new org.apache.thrift.meta_data.FieldMetaData("partitionSpecs", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SOURCE_DB, new org.apache.thrift.meta_data.FieldMetaData("source_db", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SOURCE_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("source_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.DEST_DB, new org.apache.thrift.meta_data.FieldMetaData("dest_db", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.DEST_TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("dest_table_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
        metaDataMap = Collections.unmodifiableMap(tmpMap);
        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partition_args.class, metaDataMap);
@@ -47945,9 +47945,9 @@ public class ThriftHiveMetastore {
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
        tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.O3, new org.apache.thrift.meta_data.FieldMetaData("o3", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.O4, new org.apache.thrift.meta_data.FieldMetaData("o4", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
        metaDataMap = Collections.unmodifiableMap(tmpMap);
        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(exchange_partition_result.class, metaDataMap);
@@ -48459,7 +48459,7 @@ public class ThriftHiveMetastore {
          while (true)
          {
            schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
              break;
            }
            switch (schemeField.id) {
@@ -48468,7 +48468,7 @@ public class ThriftHiveMetastore {
                  struct.success = new Partition();
                  struct.success.read(iprot);
                  struct.setSuccessIsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -48477,7 +48477,7 @@ public class ThriftHiveMetastore {
                  struct.o1 = new MetaException();
                  struct.o1.read(iprot);
                  struct.setO1IsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -48486,7 +48486,7 @@ public class ThriftHiveMetastore {
                  struct.o2 = new NoSuchObjectException();
                  struct.o2.read(iprot);
                  struct.setO2IsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -48495,7 +48495,7 @@ public class ThriftHiveMetastore {
                  struct.o3 = new InvalidObjectException();
                  struct.o3.read(iprot);
                  struct.setO3IsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -48504,7 +48504,7 @@ public class ThriftHiveMetastore {
                  struct.o4 = new InvalidInputException();
                  struct.o4.read(iprot);
                  struct.setO4IsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -48726,17 +48726,17 @@ public class ThriftHiveMetastore {
      public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
      static {
        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.DB_NAME, new org.apache.thrift.meta_data.FieldMetaData("db_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.TBL_NAME, new org.apache.thrift.meta_data.FieldMetaData("tbl_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ tmpMap.put(_Fields.PART_VALS, new org.apache.thrift.meta_data.FieldMetaData("part_vals", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
- tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("user_name", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ tmpMap.put(_Fields.GROUP_NAMES, new org.apache.thrift.meta_data.FieldMetaData("group_names", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
                new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
        metaDataMap = Collections.unmodifiableMap(tmpMap);
        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_args.class, metaDataMap);
@@ -49283,7 +49283,7 @@ public class ThriftHiveMetastore {
          while (true)
          {
            schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
              break;
            }
            switch (schemeField.id) {
@@ -49291,7 +49291,7 @@ public class ThriftHiveMetastore {
                if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                  struct.db_name = iprot.readString();
                  struct.setDb_nameIsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -49299,7 +49299,7 @@ public class ThriftHiveMetastore {
                if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                  struct.tbl_name = iprot.readString();
                  struct.setTbl_nameIsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -49317,7 +49317,7 @@ public class ThriftHiveMetastore {
                    iprot.readListEnd();
                  }
                  struct.setPart_valsIsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -49325,7 +49325,7 @@ public class ThriftHiveMetastore {
                if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                  struct.user_name = iprot.readString();
                  struct.setUser_nameIsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -49343,7 +49343,7 @@ public class ThriftHiveMetastore {
                    iprot.readListEnd();
                  }
                  struct.setGroup_namesIsSet(true);
- } else {
+ } else {
                  org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                break;
@@ -49594,11 +49594,11 @@ public class ThriftHiveMetastore {
      public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
      static {
        Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Partition.class)));
- tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.O1, new org.apache.thrift.meta_data.FieldMetaData("o1", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ tmpMap.put(_Fields.O2, new org.apache.thrift.meta_data.FieldMetaData("o2", org.apache.thrift.TFieldRequirementType.DEFAULT,
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
        metaDataMap = Collections.unmodifiableMap(tmpMap);
        org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_partition_with_auth_result.class, metaDataMap);

Modified: hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java (original)
+++ hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java Fri Jun 21 02:27:15 2013
@@ -38,6 +38,7 @@ import org.apache.hadoop.hive.serde2.laz
  import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyShortObjectInspector;
  import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyStringObjectInspector;
  import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyTimestampObjectInspector;
+import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyVoidObjectInspector;
  import org.apache.hadoop.hive.serde2.lazydio.LazyDioBoolean;
  import org.apache.hadoop.hive.serde2.lazydio.LazyDioByte;
  import org.apache.hadoop.hive.serde2.lazydio.LazyDioDouble;
@@ -115,6 +116,8 @@ public final class LazyFactory {
        return new LazyBinary((LazyBinaryObjectInspector) oi);
      case DECIMAL:
        return new LazyHiveDecimal((LazyHiveDecimalObjectInspector) oi);
+ case VOID:
+ return new LazyVoid((LazyVoidObjectInspector) oi);
      default:
        throw new RuntimeException("Internal error: no LazyObject for " + p);
      }

Added: hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyVoid.java
URL: http://svn.apache.org/viewvc/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyVoid.java?rev=1495273&view=auto
==============================================================================
--- hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyVoid.java (added)
+++ hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyVoid.java Fri Jun 21 02:27:15 2013
@@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.serde2.lazy;
+
+import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyVoidObjectInspector;
+import org.apache.hadoop.io.NullWritable;
+
+public class LazyVoid extends LazyPrimitive<LazyVoidObjectInspector, NullWritable> {
+
+ LazyVoid(LazyVoidObjectInspector lazyVoidObjectInspector) {
+ super(lazyVoidObjectInspector);
+ }
+
+ LazyVoid(LazyPrimitive<LazyVoidObjectInspector, NullWritable> copy) {
+ super(copy);
+ }
+
+ @Override
+ public void init(ByteArrayRef bytes, int start, int length) {
+ }
+}

Modified: hive/trunk/service/if/TCLIService.thrift
URL: http://svn.apache.org/viewvc/hive/trunk/service/if/TCLIService.thrift?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/if/TCLIService.thrift (original)
+++ hive/trunk/service/if/TCLIService.thrift Fri Jun 21 02:27:15 2013
@@ -57,21 +57,23 @@ enum TTypeId {
    STRUCT_TYPE,
    UNION_TYPE,
    USER_DEFINED_TYPE,
- DECIMAL_TYPE
+ DECIMAL_TYPE,
+ NULL_TYPE,
  }

  const set<TTypeId> PRIMITIVE_TYPES = [
- TTypeId.BOOLEAN_TYPE
- TTypeId.TINYINT_TYPE
- TTypeId.SMALLINT_TYPE
- TTypeId.INT_TYPE
- TTypeId.BIGINT_TYPE
- TTypeId.FLOAT_TYPE
- TTypeId.DOUBLE_TYPE
- TTypeId.STRING_TYPE
- TTypeId.TIMESTAMP_TYPE
+ TTypeId.BOOLEAN_TYPE,
+ TTypeId.TINYINT_TYPE,
+ TTypeId.SMALLINT_TYPE,
+ TTypeId.INT_TYPE,
+ TTypeId.BIGINT_TYPE,
+ TTypeId.FLOAT_TYPE,
+ TTypeId.DOUBLE_TYPE,
+ TTypeId.STRING_TYPE,
+ TTypeId.TIMESTAMP_TYPE,
    TTypeId.BINARY_TYPE,
- TTypeId.DECIMAL_TYPE
+ TTypeId.DECIMAL_TYPE,
+ TTypeId.NULL_TYPE
  ]

  const set<TTypeId> COMPLEX_TYPES = [
@@ -101,8 +103,9 @@ const map<TTypeId,string> TYPE_NAMES = {
    TTypeId.ARRAY_TYPE: "ARRAY",
    TTypeId.MAP_TYPE: "MAP",
    TTypeId.STRUCT_TYPE: "STRUCT",
- TTypeId.UNION_TYPE: "UNIONTYPE"
- TTypeId.DECIMAL_TYPE: "DECIMAL"
+ TTypeId.UNION_TYPE: "UNIONTYPE",
+ TTypeId.DECIMAL_TYPE: "DECIMAL",
+ TTypeId.NULL_TYPE: "NULL"
  }

  // Thrift does not support recursively defined types or forward declarations,
@@ -285,7 +288,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
+ 7: TStringValue stringVal // STRING, LIST, MAP, STRUCT, UNIONTYPE, BINARY, DECIMAL, NULL
  }

  // Represents a row in a rowset.

Modified: hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp (original)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_constants.cpp Fri Jun 21 02:27:15 2013
@@ -22,6 +22,7 @@ TCLIServiceConstants::TCLIServiceConstan
    PRIMITIVE_TYPES.insert((TTypeId::type)8);
    PRIMITIVE_TYPES.insert((TTypeId::type)9);
    PRIMITIVE_TYPES.insert((TTypeId::type)15);
+ PRIMITIVE_TYPES.insert((TTypeId::type)16);

    COMPLEX_TYPES.insert((TTypeId::type)10);
    COMPLEX_TYPES.insert((TTypeId::type)11);
@@ -47,6 +48,7 @@ TCLIServiceConstants::TCLIServiceConstan
    TYPE_NAMES.insert(std::make_pair((TTypeId::type)12, "STRUCT"));
    TYPE_NAMES.insert(std::make_pair((TTypeId::type)13, "UNIONTYPE"));
    TYPE_NAMES.insert(std::make_pair((TTypeId::type)15, "DECIMAL"));
+ TYPE_NAMES.insert(std::make_pair((TTypeId::type)16, "NULL"));

  }


Modified: hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp (original)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.cpp Fri Jun 21 02:27:15 2013
@@ -34,7 +34,8 @@ int _kTTypeIdValues[] = {
    TTypeId::STRUCT_TYPE,
    TTypeId::UNION_TYPE,
    TTypeId::USER_DEFINED_TYPE,
- TTypeId::DECIMAL_TYPE
+ TTypeId::DECIMAL_TYPE,
+ TTypeId::NULL_TYPE
  };
  const char* _kTTypeIdNames[] = {
    "BOOLEAN_TYPE",
@@ -52,9 +53,10 @@ const char* _kTTypeIdNames[] = {
    "STRUCT_TYPE",
    "UNION_TYPE",
    "USER_DEFINED_TYPE",
- "DECIMAL_TYPE"
+ "DECIMAL_TYPE",
+ "NULL_TYPE"
  };
-const std::map<int, const char*> _TTypeId_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(16, _kTTypeIdValues, _kTTypeIdNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
+const std::map<int, const char*> _TTypeId_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(17, _kTTypeIdValues, _kTTypeIdNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

  int _kTStatusCodeValues[] = {
    TStatusCode::SUCCESS_STATUS,

Modified: hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.h
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.h?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.h (original)
+++ hive/trunk/service/src/gen/thrift/gen-cpp/TCLIService_types.h Fri Jun 21 02:27:15 2013
@@ -41,7 +41,8 @@ struct TTypeId {
      STRUCT_TYPE = 12,
      UNION_TYPE = 13,
      USER_DEFINED_TYPE = 14,
- DECIMAL_TYPE = 15
+ DECIMAL_TYPE = 15,
+ NULL_TYPE = 16
    };
  };


Modified: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java (original)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TCLIServiceConstants.java Fri Jun 21 02:27:15 2013
@@ -46,6 +46,7 @@ public class TCLIServiceConstants {
      PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.TIMESTAMP_TYPE);
      PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.BINARY_TYPE);
      PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.DECIMAL_TYPE);
+ PRIMITIVE_TYPES.add(org.apache.hive.service.cli.thrift.TTypeId.NULL_TYPE);
    }

    public static final Set<TTypeId> COMPLEX_TYPES = new HashSet<TTypeId>();
@@ -80,6 +81,7 @@ public class TCLIServiceConstants {
      TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.STRUCT_TYPE, "STRUCT");
      TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.UNION_TYPE, "UNIONTYPE");
      TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.DECIMAL_TYPE, "DECIMAL");
+ TYPE_NAMES.put(org.apache.hive.service.cli.thrift.TTypeId.NULL_TYPE, "NULL");
    }

  }

Modified: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java (original)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TTypeId.java Fri Jun 21 02:27:15 2013
@@ -27,7 +27,8 @@ public enum TTypeId implements org.apach
    STRUCT_TYPE(12),
    UNION_TYPE(13),
    USER_DEFINED_TYPE(14),
- DECIMAL_TYPE(15);
+ DECIMAL_TYPE(15),
+ NULL_TYPE(16);

    private final int value;

@@ -80,6 +81,8 @@ public enum TTypeId implements org.apach
          return USER_DEFINED_TYPE;
        case 15:
          return DECIMAL_TYPE;
+ case 16:
+ return NULL_TYPE;
        default:
          return null;
      }

Modified: hive/trunk/service/src/gen/thrift/gen-py/TCLIService/constants.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/TCLIService/constants.py?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/TCLIService/constants.py (original)
+++ hive/trunk/service/src/gen/thrift/gen-py/TCLIService/constants.py Fri Jun 21 02:27:15 2013
@@ -21,6 +21,7 @@ PRIMITIVE_TYPES = set([
      8,
      9,
      15,
+ 16,
  ])
  COMPLEX_TYPES = set([
      10,
@@ -49,4 +50,5 @@ TYPE_NAMES = {
      12 : "STRUCT",
      13 : "UNIONTYPE",
      15 : "DECIMAL",
+ 16 : "NULL",
  }

Modified: hive/trunk/service/src/gen/thrift/gen-py/TCLIService/ttypes.py
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-py/TCLIService/ttypes.py?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-py/TCLIService/ttypes.py (original)
+++ hive/trunk/service/src/gen/thrift/gen-py/TCLIService/ttypes.py Fri Jun 21 02:27:15 2013
@@ -44,6 +44,7 @@ class TTypeId:
    UNION_TYPE = 13
    USER_DEFINED_TYPE = 14
    DECIMAL_TYPE = 15
+ NULL_TYPE = 16

    _VALUES_TO_NAMES = {
      0: "BOOLEAN_TYPE",
@@ -62,6 +63,7 @@ class TTypeId:
      13: "UNION_TYPE",
      14: "USER_DEFINED_TYPE",
      15: "DECIMAL_TYPE",
+ 16: "NULL_TYPE",
    }

    _NAMES_TO_VALUES = {
@@ -81,6 +83,7 @@ class TTypeId:
      "UNION_TYPE": 13,
      "USER_DEFINED_TYPE": 14,
      "DECIMAL_TYPE": 15,
+ "NULL_TYPE": 16,
    }

  class TStatusCode:

Modified: hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb (original)
+++ hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_constants.rb Fri Jun 21 02:27:15 2013
@@ -19,6 +19,7 @@ PRIMITIVE_TYPES = Set.new([
      8,
      9,
      15,
+ 16,
  ])

  COMPLEX_TYPES = Set.new([
@@ -50,5 +51,6 @@ TYPE_NAMES = {
      12 => %q"STRUCT",
      13 => %q"UNIONTYPE",
      15 => %q"DECIMAL",
+ 16 => %q"NULL",
  }


Modified: hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb (original)
+++ hive/trunk/service/src/gen/thrift/gen-rb/t_c_l_i_service_types.rb Fri Jun 21 02:27:15 2013
@@ -29,8 +29,9 @@ module TTypeId
    UNION_TYPE = 13
    USER_DEFINED_TYPE = 14
    DECIMAL_TYPE = 15
- VALUE_MAP = {0 => "BOOLEAN_TYPE", 1 => "TINYINT_TYPE", 2 => "SMALLINT_TYPE", 3 => "INT_TYPE", 4 => "BIGINT_TYPE", 5 => "FLOAT_TYPE", 6 => "DOUBLE_TYPE", 7 => "STRING_TYPE", 8 => "TIMESTAMP_TYPE", 9 => "BINARY_TYPE", 10 => "ARRAY_TYPE", 11 => "MAP_TYPE", 12 => "STRUCT_TYPE", 13 => "UNION_TYPE", 14 => "USER_DEFINED_TYPE", 15 => "DECIMAL_TYPE"}
- VALID_VALUES = Set.new([BOOLEAN_TYPE, TINYINT_TYPE, SMALLINT_TYPE, INT_TYPE, BIGINT_TYPE, FLOAT_TYPE, DOUBLE_TYPE, STRING_TYPE, TIMESTAMP_TYPE, BINARY_TYPE, ARRAY_TYPE, MAP_TYPE, STRUCT_TYPE, UNION_TYPE, USER_DEFINED_TYPE, DECIMAL_TYPE]).freeze
+ NULL_TYPE = 16
+ VALUE_MAP = {0 => "BOOLEAN_TYPE", 1 => "TINYINT_TYPE", 2 => "SMALLINT_TYPE", 3 => "INT_TYPE", 4 => "BIGINT_TYPE", 5 => "FLOAT_TYPE", 6 => "DOUBLE_TYPE", 7 => "STRING_TYPE", 8 => "TIMESTAMP_TYPE", 9 => "BINARY_TYPE", 10 => "ARRAY_TYPE", 11 => "MAP_TYPE", 12 => "STRUCT_TYPE", 13 => "UNION_TYPE", 14 => "USER_DEFINED_TYPE", 15 => "DECIMAL_TYPE", 16 => "NULL_TYPE"}
+ VALID_VALUES = Set.new([BOOLEAN_TYPE, TINYINT_TYPE, SMALLINT_TYPE, INT_TYPE, BIGINT_TYPE, FLOAT_TYPE, DOUBLE_TYPE, STRING_TYPE, TIMESTAMP_TYPE, BINARY_TYPE, ARRAY_TYPE, MAP_TYPE, STRUCT_TYPE, UNION_TYPE, USER_DEFINED_TYPE, DECIMAL_TYPE, NULL_TYPE]).freeze
  end

  module TStatusCode

Modified: hive/trunk/service/src/java/org/apache/hive/service/cli/ColumnValue.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hive/service/cli/ColumnValue.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/java/org/apache/hive/service/cli/ColumnValue.java (original)
+++ hive/trunk/service/src/java/org/apache/hive/service/cli/ColumnValue.java Fri Jun 21 02:27:15 2013
@@ -36,6 +36,12 @@ import org.apache.hive.service.cli.thrif
   */
  public class ColumnValue {

+ public static final TColumnValue NULL = new TColumnValue();
+
+ static {
+ NULL.setStringVal(new TStringValue());
+ }
+
    // TODO: replace this with a non-Thrift implementation
    private final TColumnValue tColumnValue;


Modified: hive/trunk/service/src/java/org/apache/hive/service/cli/Row.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hive/service/cli/Row.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/java/org/apache/hive/service/cli/Row.java (original)
+++ hive/trunk/service/src/java/org/apache/hive/service/cli/Row.java Fri Jun 21 02:27:15 2013
@@ -71,7 +71,11 @@ public class Row {
    public TRow toTRow() {
      TRow tRow = new TRow();
      for (ColumnValue columnValue : values) {
- tRow.addToColVals(columnValue.toTColumnValue());
+ if (columnValue != null) {
+ tRow.addToColVals(columnValue.toTColumnValue());
+ } else {
+ tRow.addToColVals(ColumnValue.NULL);
+ }
      }
      return tRow;
    }

Modified: hive/trunk/service/src/java/org/apache/hive/service/cli/Type.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/java/org/apache/hive/service/cli/Type.java?rev=1495273&r1=1495272&r2=1495273&view=diff
==============================================================================
--- hive/trunk/service/src/java/org/apache/hive/service/cli/Type.java (original)
+++ hive/trunk/service/src/java/org/apache/hive/service/cli/Type.java Fri Jun 21 02:27:15 2013
@@ -27,6 +27,9 @@ import org.apache.hive.service.cli.thrif
   *
   */
  public enum Type {
+ NULL_TYPE("VOID",
+ java.sql.Types.NULL,
+ TTypeId.NULL_TYPE),
    BOOLEAN_TYPE("BOOLEAN",
        java.sql.Types.BOOLEAN,
        TTypeId.BOOLEAN_TYPE),
@@ -77,7 +80,7 @@ public enum Type {
        java.sql.Types.VARCHAR,
        TTypeId.STRING_TYPE,
        true, false),
- USER_DEFINED_TYPE(null,
+ USER_DEFINED_TYPE("USER_DEFINED",
        java.sql.Types.VARCHAR,
        TTypeId.STRING_TYPE,
        true, false);
@@ -123,6 +126,9 @@ public enum Type {
    }

    public static Type getType(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException("Invalid type name: null");
+ }
      for (Type type : values()) {
        if (name.equalsIgnoreCase(type.name)) {
          return type;

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJun 21, '13 at 2:27a
activeJun 21, '13 at 2:27a
posts1
users1
websitehive.apache.org

1 user in discussion

Hashutosh: 1 post

People

Translate

site design / logo © 2021 Grokbase