You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/03/12 18:45:12 UTC
svn commit: r1455646 [9/25] - in /hive/trunk/service/src/gen/thrift:
gen-cpp/ gen-javabean/org/apache/hive/ gen-javabean/org/apache/hive/service/
gen-javabean/org/apache/hive/service/cli/
gen-javabean/org/apache/hive/service/cli/thrift/ gen-php/ gen-py...
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumn.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumn.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumn.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumn.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,916 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TColumn extends org.apache.thrift.TUnion<TColumn, TColumn._Fields> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn");
+ private static final org.apache.thrift.protocol.TField BOOL_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("boolColumn", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField BYTE_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("byteColumn", org.apache.thrift.protocol.TType.LIST, (short)2);
+ private static final org.apache.thrift.protocol.TField I16_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("i16Column", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField I32_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("i32Column", org.apache.thrift.protocol.TType.LIST, (short)4);
+ private static final org.apache.thrift.protocol.TField I64_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("i64Column", org.apache.thrift.protocol.TType.LIST, (short)5);
+ private static final org.apache.thrift.protocol.TField DOUBLE_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleColumn", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField STRING_COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("stringColumn", org.apache.thrift.protocol.TType.LIST, (short)7);
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ BOOL_COLUMN((short)1, "boolColumn"),
+ BYTE_COLUMN((short)2, "byteColumn"),
+ I16_COLUMN((short)3, "i16Column"),
+ I32_COLUMN((short)4, "i32Column"),
+ I64_COLUMN((short)5, "i64Column"),
+ DOUBLE_COLUMN((short)6, "doubleColumn"),
+ STRING_COLUMN((short)7, "stringColumn");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // BOOL_COLUMN
+ return BOOL_COLUMN;
+ case 2: // BYTE_COLUMN
+ return BYTE_COLUMN;
+ case 3: // I16_COLUMN
+ return I16_COLUMN;
+ case 4: // I32_COLUMN
+ return I32_COLUMN;
+ case 5: // I64_COLUMN
+ return I64_COLUMN;
+ case 6: // DOUBLE_COLUMN
+ return DOUBLE_COLUMN;
+ case 7: // STRING_COLUMN
+ return STRING_COLUMN;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ 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.BOOL_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("boolColumn", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBoolValue.class))));
+ tmpMap.put(_Fields.BYTE_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("byteColumn", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TByteValue.class))));
+ tmpMap.put(_Fields.I16_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("i16Column", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI16Value.class))));
+ tmpMap.put(_Fields.I32_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("i32Column", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI32Value.class))));
+ tmpMap.put(_Fields.I64_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("i64Column", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI64Value.class))));
+ tmpMap.put(_Fields.DOUBLE_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("doubleColumn", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDoubleValue.class))));
+ tmpMap.put(_Fields.STRING_COLUMN, new org.apache.thrift.meta_data.FieldMetaData("stringColumn", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStringValue.class))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumn.class, metaDataMap);
+ }
+
+ public TColumn() {
+ super();
+ }
+
+ public TColumn(_Fields setField, Object value) {
+ super(setField, value);
+ }
+
+ public TColumn(TColumn other) {
+ super(other);
+ }
+ public TColumn deepCopy() {
+ return new TColumn(this);
+ }
+
+ public static TColumn boolColumn(List<TBoolValue> value) {
+ TColumn x = new TColumn();
+ x.setBoolColumn(value);
+ return x;
+ }
+
+ public static TColumn byteColumn(List<TByteValue> value) {
+ TColumn x = new TColumn();
+ x.setByteColumn(value);
+ return x;
+ }
+
+ public static TColumn i16Column(List<TI16Value> value) {
+ TColumn x = new TColumn();
+ x.setI16Column(value);
+ return x;
+ }
+
+ public static TColumn i32Column(List<TI32Value> value) {
+ TColumn x = new TColumn();
+ x.setI32Column(value);
+ return x;
+ }
+
+ public static TColumn i64Column(List<TI64Value> value) {
+ TColumn x = new TColumn();
+ x.setI64Column(value);
+ return x;
+ }
+
+ public static TColumn doubleColumn(List<TDoubleValue> value) {
+ TColumn x = new TColumn();
+ x.setDoubleColumn(value);
+ return x;
+ }
+
+ public static TColumn stringColumn(List<TStringValue> value) {
+ TColumn x = new TColumn();
+ x.setStringColumn(value);
+ return x;
+ }
+
+
+ @Override
+ protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ switch (setField) {
+ case BOOL_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TBoolValue> for field 'boolColumn', but got " + value.getClass().getSimpleName());
+ case BYTE_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TByteValue> for field 'byteColumn', but got " + value.getClass().getSimpleName());
+ case I16_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TI16Value> for field 'i16Column', but got " + value.getClass().getSimpleName());
+ case I32_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TI32Value> for field 'i32Column', but got " + value.getClass().getSimpleName());
+ case I64_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TI64Value> for field 'i64Column', but got " + value.getClass().getSimpleName());
+ case DOUBLE_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TDoubleValue> for field 'doubleColumn', but got " + value.getClass().getSimpleName());
+ case STRING_COLUMN:
+ if (value instanceof List) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type List<TStringValue> for field 'stringColumn', but got " + value.getClass().getSimpleName());
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(field.id);
+ if (setField != null) {
+ switch (setField) {
+ case BOOL_COLUMN:
+ if (field.type == BOOL_COLUMN_FIELD_DESC.type) {
+ List<TBoolValue> boolColumn;
+ {
+ org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
+ boolColumn = new ArrayList<TBoolValue>(_list36.size);
+ for (int _i37 = 0; _i37 < _list36.size; ++_i37)
+ {
+ TBoolValue _elem38; // required
+ _elem38 = new TBoolValue();
+ _elem38.read(iprot);
+ boolColumn.add(_elem38);
+ }
+ iprot.readListEnd();
+ }
+ return boolColumn;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case BYTE_COLUMN:
+ if (field.type == BYTE_COLUMN_FIELD_DESC.type) {
+ List<TByteValue> byteColumn;
+ {
+ org.apache.thrift.protocol.TList _list39 = iprot.readListBegin();
+ byteColumn = new ArrayList<TByteValue>(_list39.size);
+ for (int _i40 = 0; _i40 < _list39.size; ++_i40)
+ {
+ TByteValue _elem41; // required
+ _elem41 = new TByteValue();
+ _elem41.read(iprot);
+ byteColumn.add(_elem41);
+ }
+ iprot.readListEnd();
+ }
+ return byteColumn;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case I16_COLUMN:
+ if (field.type == I16_COLUMN_FIELD_DESC.type) {
+ List<TI16Value> i16Column;
+ {
+ org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
+ i16Column = new ArrayList<TI16Value>(_list42.size);
+ for (int _i43 = 0; _i43 < _list42.size; ++_i43)
+ {
+ TI16Value _elem44; // required
+ _elem44 = new TI16Value();
+ _elem44.read(iprot);
+ i16Column.add(_elem44);
+ }
+ iprot.readListEnd();
+ }
+ return i16Column;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case I32_COLUMN:
+ if (field.type == I32_COLUMN_FIELD_DESC.type) {
+ List<TI32Value> i32Column;
+ {
+ org.apache.thrift.protocol.TList _list45 = iprot.readListBegin();
+ i32Column = new ArrayList<TI32Value>(_list45.size);
+ for (int _i46 = 0; _i46 < _list45.size; ++_i46)
+ {
+ TI32Value _elem47; // required
+ _elem47 = new TI32Value();
+ _elem47.read(iprot);
+ i32Column.add(_elem47);
+ }
+ iprot.readListEnd();
+ }
+ return i32Column;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case I64_COLUMN:
+ if (field.type == I64_COLUMN_FIELD_DESC.type) {
+ List<TI64Value> i64Column;
+ {
+ org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
+ i64Column = new ArrayList<TI64Value>(_list48.size);
+ for (int _i49 = 0; _i49 < _list48.size; ++_i49)
+ {
+ TI64Value _elem50; // required
+ _elem50 = new TI64Value();
+ _elem50.read(iprot);
+ i64Column.add(_elem50);
+ }
+ iprot.readListEnd();
+ }
+ return i64Column;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case DOUBLE_COLUMN:
+ if (field.type == DOUBLE_COLUMN_FIELD_DESC.type) {
+ List<TDoubleValue> doubleColumn;
+ {
+ org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
+ doubleColumn = new ArrayList<TDoubleValue>(_list51.size);
+ for (int _i52 = 0; _i52 < _list51.size; ++_i52)
+ {
+ TDoubleValue _elem53; // required
+ _elem53 = new TDoubleValue();
+ _elem53.read(iprot);
+ doubleColumn.add(_elem53);
+ }
+ iprot.readListEnd();
+ }
+ return doubleColumn;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case STRING_COLUMN:
+ if (field.type == STRING_COLUMN_FIELD_DESC.type) {
+ List<TStringValue> stringColumn;
+ {
+ org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
+ stringColumn = new ArrayList<TStringValue>(_list54.size);
+ for (int _i55 = 0; _i55 < _list54.size; ++_i55)
+ {
+ TStringValue _elem56; // required
+ _elem56 = new TStringValue();
+ _elem56.read(iprot);
+ stringColumn.add(_elem56);
+ }
+ iprot.readListEnd();
+ }
+ return stringColumn;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case BOOL_COLUMN:
+ List<TBoolValue> boolColumn = (List<TBoolValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, boolColumn.size()));
+ for (TBoolValue _iter57 : boolColumn)
+ {
+ _iter57.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case BYTE_COLUMN:
+ List<TByteValue> byteColumn = (List<TByteValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, byteColumn.size()));
+ for (TByteValue _iter58 : byteColumn)
+ {
+ _iter58.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case I16_COLUMN:
+ List<TI16Value> i16Column = (List<TI16Value>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, i16Column.size()));
+ for (TI16Value _iter59 : i16Column)
+ {
+ _iter59.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case I32_COLUMN:
+ List<TI32Value> i32Column = (List<TI32Value>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, i32Column.size()));
+ for (TI32Value _iter60 : i32Column)
+ {
+ _iter60.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case I64_COLUMN:
+ List<TI64Value> i64Column = (List<TI64Value>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, i64Column.size()));
+ for (TI64Value _iter61 : i64Column)
+ {
+ _iter61.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case DOUBLE_COLUMN:
+ List<TDoubleValue> doubleColumn = (List<TDoubleValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, doubleColumn.size()));
+ for (TDoubleValue _iter62 : doubleColumn)
+ {
+ _iter62.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case STRING_COLUMN:
+ List<TStringValue> stringColumn = (List<TStringValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, stringColumn.size()));
+ for (TStringValue _iter63 : stringColumn)
+ {
+ _iter63.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(fieldID);
+ if (setField != null) {
+ switch (setField) {
+ case BOOL_COLUMN:
+ List<TBoolValue> boolColumn;
+ {
+ org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
+ boolColumn = new ArrayList<TBoolValue>(_list64.size);
+ for (int _i65 = 0; _i65 < _list64.size; ++_i65)
+ {
+ TBoolValue _elem66; // required
+ _elem66 = new TBoolValue();
+ _elem66.read(iprot);
+ boolColumn.add(_elem66);
+ }
+ iprot.readListEnd();
+ }
+ return boolColumn;
+ case BYTE_COLUMN:
+ List<TByteValue> byteColumn;
+ {
+ org.apache.thrift.protocol.TList _list67 = iprot.readListBegin();
+ byteColumn = new ArrayList<TByteValue>(_list67.size);
+ for (int _i68 = 0; _i68 < _list67.size; ++_i68)
+ {
+ TByteValue _elem69; // required
+ _elem69 = new TByteValue();
+ _elem69.read(iprot);
+ byteColumn.add(_elem69);
+ }
+ iprot.readListEnd();
+ }
+ return byteColumn;
+ case I16_COLUMN:
+ List<TI16Value> i16Column;
+ {
+ org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
+ i16Column = new ArrayList<TI16Value>(_list70.size);
+ for (int _i71 = 0; _i71 < _list70.size; ++_i71)
+ {
+ TI16Value _elem72; // required
+ _elem72 = new TI16Value();
+ _elem72.read(iprot);
+ i16Column.add(_elem72);
+ }
+ iprot.readListEnd();
+ }
+ return i16Column;
+ case I32_COLUMN:
+ List<TI32Value> i32Column;
+ {
+ org.apache.thrift.protocol.TList _list73 = iprot.readListBegin();
+ i32Column = new ArrayList<TI32Value>(_list73.size);
+ for (int _i74 = 0; _i74 < _list73.size; ++_i74)
+ {
+ TI32Value _elem75; // required
+ _elem75 = new TI32Value();
+ _elem75.read(iprot);
+ i32Column.add(_elem75);
+ }
+ iprot.readListEnd();
+ }
+ return i32Column;
+ case I64_COLUMN:
+ List<TI64Value> i64Column;
+ {
+ org.apache.thrift.protocol.TList _list76 = iprot.readListBegin();
+ i64Column = new ArrayList<TI64Value>(_list76.size);
+ for (int _i77 = 0; _i77 < _list76.size; ++_i77)
+ {
+ TI64Value _elem78; // required
+ _elem78 = new TI64Value();
+ _elem78.read(iprot);
+ i64Column.add(_elem78);
+ }
+ iprot.readListEnd();
+ }
+ return i64Column;
+ case DOUBLE_COLUMN:
+ List<TDoubleValue> doubleColumn;
+ {
+ org.apache.thrift.protocol.TList _list79 = iprot.readListBegin();
+ doubleColumn = new ArrayList<TDoubleValue>(_list79.size);
+ for (int _i80 = 0; _i80 < _list79.size; ++_i80)
+ {
+ TDoubleValue _elem81; // required
+ _elem81 = new TDoubleValue();
+ _elem81.read(iprot);
+ doubleColumn.add(_elem81);
+ }
+ iprot.readListEnd();
+ }
+ return doubleColumn;
+ case STRING_COLUMN:
+ List<TStringValue> stringColumn;
+ {
+ org.apache.thrift.protocol.TList _list82 = iprot.readListBegin();
+ stringColumn = new ArrayList<TStringValue>(_list82.size);
+ for (int _i83 = 0; _i83 < _list82.size; ++_i83)
+ {
+ TStringValue _elem84; // required
+ _elem84 = new TStringValue();
+ _elem84.read(iprot);
+ stringColumn.add(_elem84);
+ }
+ iprot.readListEnd();
+ }
+ return stringColumn;
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ }
+ }
+
+ @Override
+ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case BOOL_COLUMN:
+ List<TBoolValue> boolColumn = (List<TBoolValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, boolColumn.size()));
+ for (TBoolValue _iter85 : boolColumn)
+ {
+ _iter85.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case BYTE_COLUMN:
+ List<TByteValue> byteColumn = (List<TByteValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, byteColumn.size()));
+ for (TByteValue _iter86 : byteColumn)
+ {
+ _iter86.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case I16_COLUMN:
+ List<TI16Value> i16Column = (List<TI16Value>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, i16Column.size()));
+ for (TI16Value _iter87 : i16Column)
+ {
+ _iter87.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case I32_COLUMN:
+ List<TI32Value> i32Column = (List<TI32Value>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, i32Column.size()));
+ for (TI32Value _iter88 : i32Column)
+ {
+ _iter88.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case I64_COLUMN:
+ List<TI64Value> i64Column = (List<TI64Value>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, i64Column.size()));
+ for (TI64Value _iter89 : i64Column)
+ {
+ _iter89.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case DOUBLE_COLUMN:
+ List<TDoubleValue> doubleColumn = (List<TDoubleValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, doubleColumn.size()));
+ for (TDoubleValue _iter90 : doubleColumn)
+ {
+ _iter90.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ case STRING_COLUMN:
+ List<TStringValue> stringColumn = (List<TStringValue>)value_;
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, stringColumn.size()));
+ for (TStringValue _iter91 : stringColumn)
+ {
+ _iter91.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
+ switch (setField) {
+ case BOOL_COLUMN:
+ return BOOL_COLUMN_FIELD_DESC;
+ case BYTE_COLUMN:
+ return BYTE_COLUMN_FIELD_DESC;
+ case I16_COLUMN:
+ return I16_COLUMN_FIELD_DESC;
+ case I32_COLUMN:
+ return I32_COLUMN_FIELD_DESC;
+ case I64_COLUMN:
+ return I64_COLUMN_FIELD_DESC;
+ case DOUBLE_COLUMN:
+ return DOUBLE_COLUMN_FIELD_DESC;
+ case STRING_COLUMN:
+ return STRING_COLUMN_FIELD_DESC;
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TStruct getStructDesc() {
+ return STRUCT_DESC;
+ }
+
+ @Override
+ protected _Fields enumForId(short id) {
+ return _Fields.findByThriftIdOrThrow(id);
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+
+ public List<TBoolValue> getBoolColumn() {
+ if (getSetField() == _Fields.BOOL_COLUMN) {
+ return (List<TBoolValue>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'boolColumn' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setBoolColumn(List<TBoolValue> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.BOOL_COLUMN;
+ value_ = value;
+ }
+
+ public List<TByteValue> getByteColumn() {
+ if (getSetField() == _Fields.BYTE_COLUMN) {
+ return (List<TByteValue>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'byteColumn' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setByteColumn(List<TByteValue> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.BYTE_COLUMN;
+ value_ = value;
+ }
+
+ public List<TI16Value> getI16Column() {
+ if (getSetField() == _Fields.I16_COLUMN) {
+ return (List<TI16Value>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'i16Column' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setI16Column(List<TI16Value> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.I16_COLUMN;
+ value_ = value;
+ }
+
+ public List<TI32Value> getI32Column() {
+ if (getSetField() == _Fields.I32_COLUMN) {
+ return (List<TI32Value>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'i32Column' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setI32Column(List<TI32Value> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.I32_COLUMN;
+ value_ = value;
+ }
+
+ public List<TI64Value> getI64Column() {
+ if (getSetField() == _Fields.I64_COLUMN) {
+ return (List<TI64Value>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'i64Column' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setI64Column(List<TI64Value> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.I64_COLUMN;
+ value_ = value;
+ }
+
+ public List<TDoubleValue> getDoubleColumn() {
+ if (getSetField() == _Fields.DOUBLE_COLUMN) {
+ return (List<TDoubleValue>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'doubleColumn' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setDoubleColumn(List<TDoubleValue> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.DOUBLE_COLUMN;
+ value_ = value;
+ }
+
+ public List<TStringValue> getStringColumn() {
+ if (getSetField() == _Fields.STRING_COLUMN) {
+ return (List<TStringValue>)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'stringColumn' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setStringColumn(List<TStringValue> value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.STRING_COLUMN;
+ value_ = value;
+ }
+
+ public boolean isSetBoolColumn() {
+ return setField_ == _Fields.BOOL_COLUMN;
+ }
+
+
+ public boolean isSetByteColumn() {
+ return setField_ == _Fields.BYTE_COLUMN;
+ }
+
+
+ public boolean isSetI16Column() {
+ return setField_ == _Fields.I16_COLUMN;
+ }
+
+
+ public boolean isSetI32Column() {
+ return setField_ == _Fields.I32_COLUMN;
+ }
+
+
+ public boolean isSetI64Column() {
+ return setField_ == _Fields.I64_COLUMN;
+ }
+
+
+ public boolean isSetDoubleColumn() {
+ return setField_ == _Fields.DOUBLE_COLUMN;
+ }
+
+
+ public boolean isSetStringColumn() {
+ return setField_ == _Fields.STRING_COLUMN;
+ }
+
+
+ public boolean equals(Object other) {
+ if (other instanceof TColumn) {
+ return equals((TColumn)other);
+ } else {
+ return false;
+ }
+ }
+
+ public boolean equals(TColumn other) {
+ return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
+ }
+
+ @Override
+ public int compareTo(TColumn other) {
+ int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
+ if (lastComparison == 0) {
+ return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
+ }
+ return lastComparison;
+ }
+
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder hcb = new HashCodeBuilder();
+ hcb.append(this.getClass().getName());
+ org.apache.thrift.TFieldIdEnum setField = getSetField();
+ if (setField != null) {
+ hcb.append(setField.getThriftFieldId());
+ Object value = getFieldValue();
+ if (value instanceof org.apache.thrift.TEnum) {
+ hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue());
+ } else {
+ hcb.append(value);
+ }
+ }
+ return hcb.toHashCode();
+ }
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+}
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnDesc.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnDesc.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnDesc.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,700 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TColumnDesc implements org.apache.thrift.TBase<TColumnDesc, TColumnDesc._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnDesc");
+
+ private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField TYPE_DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("typeDesc", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField POSITION_FIELD_DESC = new org.apache.thrift.protocol.TField("position", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TColumnDescStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TColumnDescTupleSchemeFactory());
+ }
+
+ private String columnName; // required
+ private TTypeDesc typeDesc; // required
+ private int position; // required
+ private String comment; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ COLUMN_NAME((short)1, "columnName"),
+ TYPE_DESC((short)2, "typeDesc"),
+ POSITION((short)3, "position"),
+ COMMENT((short)4, "comment");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // COLUMN_NAME
+ return COLUMN_NAME;
+ case 2: // TYPE_DESC
+ return TYPE_DESC;
+ case 3: // POSITION
+ return POSITION;
+ case 4: // COMMENT
+ return COMMENT;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __POSITION_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.COMMENT};
+ 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.COLUMN_NAME, new org.apache.thrift.meta_data.FieldMetaData("columnName", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.TYPE_DESC, new org.apache.thrift.meta_data.FieldMetaData("typeDesc", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTypeDesc.class)));
+ tmpMap.put(_Fields.POSITION, new org.apache.thrift.meta_data.FieldMetaData("position", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnDesc.class, metaDataMap);
+ }
+
+ public TColumnDesc() {
+ }
+
+ public TColumnDesc(
+ String columnName,
+ TTypeDesc typeDesc,
+ int position)
+ {
+ this();
+ this.columnName = columnName;
+ this.typeDesc = typeDesc;
+ this.position = position;
+ setPositionIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TColumnDesc(TColumnDesc other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetColumnName()) {
+ this.columnName = other.columnName;
+ }
+ if (other.isSetTypeDesc()) {
+ this.typeDesc = new TTypeDesc(other.typeDesc);
+ }
+ this.position = other.position;
+ if (other.isSetComment()) {
+ this.comment = other.comment;
+ }
+ }
+
+ public TColumnDesc deepCopy() {
+ return new TColumnDesc(this);
+ }
+
+ @Override
+ public void clear() {
+ this.columnName = null;
+ this.typeDesc = null;
+ setPositionIsSet(false);
+ this.position = 0;
+ this.comment = null;
+ }
+
+ public String getColumnName() {
+ return this.columnName;
+ }
+
+ public void setColumnName(String columnName) {
+ this.columnName = columnName;
+ }
+
+ public void unsetColumnName() {
+ this.columnName = null;
+ }
+
+ /** Returns true if field columnName is set (has been assigned a value) and false otherwise */
+ public boolean isSetColumnName() {
+ return this.columnName != null;
+ }
+
+ public void setColumnNameIsSet(boolean value) {
+ if (!value) {
+ this.columnName = null;
+ }
+ }
+
+ public TTypeDesc getTypeDesc() {
+ return this.typeDesc;
+ }
+
+ public void setTypeDesc(TTypeDesc typeDesc) {
+ this.typeDesc = typeDesc;
+ }
+
+ public void unsetTypeDesc() {
+ this.typeDesc = null;
+ }
+
+ /** Returns true if field typeDesc is set (has been assigned a value) and false otherwise */
+ public boolean isSetTypeDesc() {
+ return this.typeDesc != null;
+ }
+
+ public void setTypeDescIsSet(boolean value) {
+ if (!value) {
+ this.typeDesc = null;
+ }
+ }
+
+ public int getPosition() {
+ return this.position;
+ }
+
+ public void setPosition(int position) {
+ this.position = position;
+ setPositionIsSet(true);
+ }
+
+ public void unsetPosition() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __POSITION_ISSET_ID);
+ }
+
+ /** Returns true if field position is set (has been assigned a value) and false otherwise */
+ public boolean isSetPosition() {
+ return EncodingUtils.testBit(__isset_bitfield, __POSITION_ISSET_ID);
+ }
+
+ public void setPositionIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __POSITION_ISSET_ID, value);
+ }
+
+ public String getComment() {
+ return this.comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public void unsetComment() {
+ this.comment = null;
+ }
+
+ /** Returns true if field comment is set (has been assigned a value) and false otherwise */
+ public boolean isSetComment() {
+ return this.comment != null;
+ }
+
+ public void setCommentIsSet(boolean value) {
+ if (!value) {
+ this.comment = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case COLUMN_NAME:
+ if (value == null) {
+ unsetColumnName();
+ } else {
+ setColumnName((String)value);
+ }
+ break;
+
+ case TYPE_DESC:
+ if (value == null) {
+ unsetTypeDesc();
+ } else {
+ setTypeDesc((TTypeDesc)value);
+ }
+ break;
+
+ case POSITION:
+ if (value == null) {
+ unsetPosition();
+ } else {
+ setPosition((Integer)value);
+ }
+ break;
+
+ case COMMENT:
+ if (value == null) {
+ unsetComment();
+ } else {
+ setComment((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case COLUMN_NAME:
+ return getColumnName();
+
+ case TYPE_DESC:
+ return getTypeDesc();
+
+ case POSITION:
+ return Integer.valueOf(getPosition());
+
+ case COMMENT:
+ return getComment();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case COLUMN_NAME:
+ return isSetColumnName();
+ case TYPE_DESC:
+ return isSetTypeDesc();
+ case POSITION:
+ return isSetPosition();
+ case COMMENT:
+ return isSetComment();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TColumnDesc)
+ return this.equals((TColumnDesc)that);
+ return false;
+ }
+
+ public boolean equals(TColumnDesc that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_columnName = true && this.isSetColumnName();
+ boolean that_present_columnName = true && that.isSetColumnName();
+ if (this_present_columnName || that_present_columnName) {
+ if (!(this_present_columnName && that_present_columnName))
+ return false;
+ if (!this.columnName.equals(that.columnName))
+ return false;
+ }
+
+ boolean this_present_typeDesc = true && this.isSetTypeDesc();
+ boolean that_present_typeDesc = true && that.isSetTypeDesc();
+ if (this_present_typeDesc || that_present_typeDesc) {
+ if (!(this_present_typeDesc && that_present_typeDesc))
+ return false;
+ if (!this.typeDesc.equals(that.typeDesc))
+ return false;
+ }
+
+ boolean this_present_position = true;
+ boolean that_present_position = true;
+ if (this_present_position || that_present_position) {
+ if (!(this_present_position && that_present_position))
+ return false;
+ if (this.position != that.position)
+ return false;
+ }
+
+ boolean this_present_comment = true && this.isSetComment();
+ boolean that_present_comment = true && that.isSetComment();
+ if (this_present_comment || that_present_comment) {
+ if (!(this_present_comment && that_present_comment))
+ return false;
+ if (!this.comment.equals(that.comment))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_columnName = true && (isSetColumnName());
+ builder.append(present_columnName);
+ if (present_columnName)
+ builder.append(columnName);
+
+ boolean present_typeDesc = true && (isSetTypeDesc());
+ builder.append(present_typeDesc);
+ if (present_typeDesc)
+ builder.append(typeDesc);
+
+ boolean present_position = true;
+ builder.append(present_position);
+ if (present_position)
+ builder.append(position);
+
+ boolean present_comment = true && (isSetComment());
+ builder.append(present_comment);
+ if (present_comment)
+ builder.append(comment);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TColumnDesc other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TColumnDesc typedOther = (TColumnDesc)other;
+
+ lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetColumnName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, typedOther.columnName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTypeDesc()).compareTo(typedOther.isSetTypeDesc());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTypeDesc()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeDesc, typedOther.typeDesc);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPosition()).compareTo(typedOther.isSetPosition());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPosition()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position, typedOther.position);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetComment()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, typedOther.comment);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TColumnDesc(");
+ boolean first = true;
+
+ sb.append("columnName:");
+ if (this.columnName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.columnName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("typeDesc:");
+ if (this.typeDesc == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.typeDesc);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("position:");
+ sb.append(this.position);
+ first = false;
+ if (isSetComment()) {
+ if (!first) sb.append(", ");
+ sb.append("comment:");
+ if (this.comment == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.comment);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetColumnName()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnName' is unset! Struct:" + toString());
+ }
+
+ if (!isSetTypeDesc()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'typeDesc' is unset! Struct:" + toString());
+ }
+
+ if (!isSetPosition()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'position' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (typeDesc != null) {
+ typeDesc.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TColumnDescStandardSchemeFactory implements SchemeFactory {
+ public TColumnDescStandardScheme getScheme() {
+ return new TColumnDescStandardScheme();
+ }
+ }
+
+ private static class TColumnDescStandardScheme extends StandardScheme<TColumnDesc> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnDesc struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // COLUMN_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.columnName = iprot.readString();
+ struct.setColumnNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TYPE_DESC
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.typeDesc = new TTypeDesc();
+ struct.typeDesc.read(iprot);
+ struct.setTypeDescIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // POSITION
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.position = iprot.readI32();
+ struct.setPositionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // COMMENT
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.comment = iprot.readString();
+ struct.setCommentIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TColumnDesc struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.columnName != null) {
+ oprot.writeFieldBegin(COLUMN_NAME_FIELD_DESC);
+ oprot.writeString(struct.columnName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.typeDesc != null) {
+ oprot.writeFieldBegin(TYPE_DESC_FIELD_DESC);
+ struct.typeDesc.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(POSITION_FIELD_DESC);
+ oprot.writeI32(struct.position);
+ oprot.writeFieldEnd();
+ if (struct.comment != null) {
+ if (struct.isSetComment()) {
+ oprot.writeFieldBegin(COMMENT_FIELD_DESC);
+ oprot.writeString(struct.comment);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TColumnDescTupleSchemeFactory implements SchemeFactory {
+ public TColumnDescTupleScheme getScheme() {
+ return new TColumnDescTupleScheme();
+ }
+ }
+
+ private static class TColumnDescTupleScheme extends TupleScheme<TColumnDesc> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TColumnDesc struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.columnName);
+ struct.typeDesc.write(oprot);
+ oprot.writeI32(struct.position);
+ BitSet optionals = new BitSet();
+ if (struct.isSetComment()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetComment()) {
+ oprot.writeString(struct.comment);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TColumnDesc struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.columnName = iprot.readString();
+ struct.setColumnNameIsSet(true);
+ struct.typeDesc = new TTypeDesc();
+ struct.typeDesc.read(iprot);
+ struct.setTypeDescIsSet(true);
+ struct.position = iprot.readI32();
+ struct.setPositionIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.comment = iprot.readString();
+ struct.setCommentIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnValue.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnValue.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnValue.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TColumnValue.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,671 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TColumnValue extends org.apache.thrift.TUnion<TColumnValue, TColumnValue._Fields> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue");
+ private static final org.apache.thrift.protocol.TField BOOL_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("boolVal", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField BYTE_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("byteVal", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField I16_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("i16Val", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField I32_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("i32Val", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField I64_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("i64Val", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField DOUBLE_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("doubleVal", org.apache.thrift.protocol.TType.STRUCT, (short)6);
+ private static final org.apache.thrift.protocol.TField STRING_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("stringVal", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ BOOL_VAL((short)1, "boolVal"),
+ BYTE_VAL((short)2, "byteVal"),
+ I16_VAL((short)3, "i16Val"),
+ I32_VAL((short)4, "i32Val"),
+ I64_VAL((short)5, "i64Val"),
+ DOUBLE_VAL((short)6, "doubleVal"),
+ STRING_VAL((short)7, "stringVal");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // BOOL_VAL
+ return BOOL_VAL;
+ case 2: // BYTE_VAL
+ return BYTE_VAL;
+ case 3: // I16_VAL
+ return I16_VAL;
+ case 4: // I32_VAL
+ return I32_VAL;
+ case 5: // I64_VAL
+ return I64_VAL;
+ case 6: // DOUBLE_VAL
+ return DOUBLE_VAL;
+ case 7: // STRING_VAL
+ return STRING_VAL;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ 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.BOOL_VAL, new org.apache.thrift.meta_data.FieldMetaData("boolVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TBoolValue.class)));
+ tmpMap.put(_Fields.BYTE_VAL, new org.apache.thrift.meta_data.FieldMetaData("byteVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TByteValue.class)));
+ tmpMap.put(_Fields.I16_VAL, new org.apache.thrift.meta_data.FieldMetaData("i16Val", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI16Value.class)));
+ tmpMap.put(_Fields.I32_VAL, new org.apache.thrift.meta_data.FieldMetaData("i32Val", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI32Value.class)));
+ tmpMap.put(_Fields.I64_VAL, new org.apache.thrift.meta_data.FieldMetaData("i64Val", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TI64Value.class)));
+ tmpMap.put(_Fields.DOUBLE_VAL, new org.apache.thrift.meta_data.FieldMetaData("doubleVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TDoubleValue.class)));
+ tmpMap.put(_Fields.STRING_VAL, new org.apache.thrift.meta_data.FieldMetaData("stringVal", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStringValue.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TColumnValue.class, metaDataMap);
+ }
+
+ public TColumnValue() {
+ super();
+ }
+
+ public TColumnValue(_Fields setField, Object value) {
+ super(setField, value);
+ }
+
+ public TColumnValue(TColumnValue other) {
+ super(other);
+ }
+ public TColumnValue deepCopy() {
+ return new TColumnValue(this);
+ }
+
+ public static TColumnValue boolVal(TBoolValue value) {
+ TColumnValue x = new TColumnValue();
+ x.setBoolVal(value);
+ return x;
+ }
+
+ public static TColumnValue byteVal(TByteValue value) {
+ TColumnValue x = new TColumnValue();
+ x.setByteVal(value);
+ return x;
+ }
+
+ public static TColumnValue i16Val(TI16Value value) {
+ TColumnValue x = new TColumnValue();
+ x.setI16Val(value);
+ return x;
+ }
+
+ public static TColumnValue i32Val(TI32Value value) {
+ TColumnValue x = new TColumnValue();
+ x.setI32Val(value);
+ return x;
+ }
+
+ public static TColumnValue i64Val(TI64Value value) {
+ TColumnValue x = new TColumnValue();
+ x.setI64Val(value);
+ return x;
+ }
+
+ public static TColumnValue doubleVal(TDoubleValue value) {
+ TColumnValue x = new TColumnValue();
+ x.setDoubleVal(value);
+ return x;
+ }
+
+ public static TColumnValue stringVal(TStringValue value) {
+ TColumnValue x = new TColumnValue();
+ x.setStringVal(value);
+ return x;
+ }
+
+
+ @Override
+ protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ switch (setField) {
+ case BOOL_VAL:
+ if (value instanceof TBoolValue) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TBoolValue for field 'boolVal', but got " + value.getClass().getSimpleName());
+ case BYTE_VAL:
+ if (value instanceof TByteValue) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TByteValue for field 'byteVal', but got " + value.getClass().getSimpleName());
+ case I16_VAL:
+ if (value instanceof TI16Value) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TI16Value for field 'i16Val', but got " + value.getClass().getSimpleName());
+ case I32_VAL:
+ if (value instanceof TI32Value) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TI32Value for field 'i32Val', but got " + value.getClass().getSimpleName());
+ case I64_VAL:
+ if (value instanceof TI64Value) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TI64Value for field 'i64Val', but got " + value.getClass().getSimpleName());
+ case DOUBLE_VAL:
+ if (value instanceof TDoubleValue) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TDoubleValue for field 'doubleVal', but got " + value.getClass().getSimpleName());
+ case STRING_VAL:
+ if (value instanceof TStringValue) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type TStringValue for field 'stringVal', but got " + value.getClass().getSimpleName());
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(field.id);
+ if (setField != null) {
+ switch (setField) {
+ case BOOL_VAL:
+ if (field.type == BOOL_VAL_FIELD_DESC.type) {
+ TBoolValue boolVal;
+ boolVal = new TBoolValue();
+ boolVal.read(iprot);
+ return boolVal;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case BYTE_VAL:
+ if (field.type == BYTE_VAL_FIELD_DESC.type) {
+ TByteValue byteVal;
+ byteVal = new TByteValue();
+ byteVal.read(iprot);
+ return byteVal;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case I16_VAL:
+ if (field.type == I16_VAL_FIELD_DESC.type) {
+ TI16Value i16Val;
+ i16Val = new TI16Value();
+ i16Val.read(iprot);
+ return i16Val;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case I32_VAL:
+ if (field.type == I32_VAL_FIELD_DESC.type) {
+ TI32Value i32Val;
+ i32Val = new TI32Value();
+ i32Val.read(iprot);
+ return i32Val;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case I64_VAL:
+ if (field.type == I64_VAL_FIELD_DESC.type) {
+ TI64Value i64Val;
+ i64Val = new TI64Value();
+ i64Val.read(iprot);
+ return i64Val;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case DOUBLE_VAL:
+ if (field.type == DOUBLE_VAL_FIELD_DESC.type) {
+ TDoubleValue doubleVal;
+ doubleVal = new TDoubleValue();
+ doubleVal.read(iprot);
+ return doubleVal;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case STRING_VAL:
+ if (field.type == STRING_VAL_FIELD_DESC.type) {
+ TStringValue stringVal;
+ stringVal = new TStringValue();
+ stringVal.read(iprot);
+ return stringVal;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case BOOL_VAL:
+ TBoolValue boolVal = (TBoolValue)value_;
+ boolVal.write(oprot);
+ return;
+ case BYTE_VAL:
+ TByteValue byteVal = (TByteValue)value_;
+ byteVal.write(oprot);
+ return;
+ case I16_VAL:
+ TI16Value i16Val = (TI16Value)value_;
+ i16Val.write(oprot);
+ return;
+ case I32_VAL:
+ TI32Value i32Val = (TI32Value)value_;
+ i32Val.write(oprot);
+ return;
+ case I64_VAL:
+ TI64Value i64Val = (TI64Value)value_;
+ i64Val.write(oprot);
+ return;
+ case DOUBLE_VAL:
+ TDoubleValue doubleVal = (TDoubleValue)value_;
+ doubleVal.write(oprot);
+ return;
+ case STRING_VAL:
+ TStringValue stringVal = (TStringValue)value_;
+ stringVal.write(oprot);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(fieldID);
+ if (setField != null) {
+ switch (setField) {
+ case BOOL_VAL:
+ TBoolValue boolVal;
+ boolVal = new TBoolValue();
+ boolVal.read(iprot);
+ return boolVal;
+ case BYTE_VAL:
+ TByteValue byteVal;
+ byteVal = new TByteValue();
+ byteVal.read(iprot);
+ return byteVal;
+ case I16_VAL:
+ TI16Value i16Val;
+ i16Val = new TI16Value();
+ i16Val.read(iprot);
+ return i16Val;
+ case I32_VAL:
+ TI32Value i32Val;
+ i32Val = new TI32Value();
+ i32Val.read(iprot);
+ return i32Val;
+ case I64_VAL:
+ TI64Value i64Val;
+ i64Val = new TI64Value();
+ i64Val.read(iprot);
+ return i64Val;
+ case DOUBLE_VAL:
+ TDoubleValue doubleVal;
+ doubleVal = new TDoubleValue();
+ doubleVal.read(iprot);
+ return doubleVal;
+ case STRING_VAL:
+ TStringValue stringVal;
+ stringVal = new TStringValue();
+ stringVal.read(iprot);
+ return stringVal;
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ }
+ }
+
+ @Override
+ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case BOOL_VAL:
+ TBoolValue boolVal = (TBoolValue)value_;
+ boolVal.write(oprot);
+ return;
+ case BYTE_VAL:
+ TByteValue byteVal = (TByteValue)value_;
+ byteVal.write(oprot);
+ return;
+ case I16_VAL:
+ TI16Value i16Val = (TI16Value)value_;
+ i16Val.write(oprot);
+ return;
+ case I32_VAL:
+ TI32Value i32Val = (TI32Value)value_;
+ i32Val.write(oprot);
+ return;
+ case I64_VAL:
+ TI64Value i64Val = (TI64Value)value_;
+ i64Val.write(oprot);
+ return;
+ case DOUBLE_VAL:
+ TDoubleValue doubleVal = (TDoubleValue)value_;
+ doubleVal.write(oprot);
+ return;
+ case STRING_VAL:
+ TStringValue stringVal = (TStringValue)value_;
+ stringVal.write(oprot);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
+ switch (setField) {
+ case BOOL_VAL:
+ return BOOL_VAL_FIELD_DESC;
+ case BYTE_VAL:
+ return BYTE_VAL_FIELD_DESC;
+ case I16_VAL:
+ return I16_VAL_FIELD_DESC;
+ case I32_VAL:
+ return I32_VAL_FIELD_DESC;
+ case I64_VAL:
+ return I64_VAL_FIELD_DESC;
+ case DOUBLE_VAL:
+ return DOUBLE_VAL_FIELD_DESC;
+ case STRING_VAL:
+ return STRING_VAL_FIELD_DESC;
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TStruct getStructDesc() {
+ return STRUCT_DESC;
+ }
+
+ @Override
+ protected _Fields enumForId(short id) {
+ return _Fields.findByThriftIdOrThrow(id);
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+
+ public TBoolValue getBoolVal() {
+ if (getSetField() == _Fields.BOOL_VAL) {
+ return (TBoolValue)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'boolVal' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setBoolVal(TBoolValue value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.BOOL_VAL;
+ value_ = value;
+ }
+
+ public TByteValue getByteVal() {
+ if (getSetField() == _Fields.BYTE_VAL) {
+ return (TByteValue)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'byteVal' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setByteVal(TByteValue value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.BYTE_VAL;
+ value_ = value;
+ }
+
+ public TI16Value getI16Val() {
+ if (getSetField() == _Fields.I16_VAL) {
+ return (TI16Value)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'i16Val' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setI16Val(TI16Value value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.I16_VAL;
+ value_ = value;
+ }
+
+ public TI32Value getI32Val() {
+ if (getSetField() == _Fields.I32_VAL) {
+ return (TI32Value)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'i32Val' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setI32Val(TI32Value value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.I32_VAL;
+ value_ = value;
+ }
+
+ public TI64Value getI64Val() {
+ if (getSetField() == _Fields.I64_VAL) {
+ return (TI64Value)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'i64Val' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setI64Val(TI64Value value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.I64_VAL;
+ value_ = value;
+ }
+
+ public TDoubleValue getDoubleVal() {
+ if (getSetField() == _Fields.DOUBLE_VAL) {
+ return (TDoubleValue)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'doubleVal' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setDoubleVal(TDoubleValue value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.DOUBLE_VAL;
+ value_ = value;
+ }
+
+ public TStringValue getStringVal() {
+ if (getSetField() == _Fields.STRING_VAL) {
+ return (TStringValue)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'stringVal' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setStringVal(TStringValue value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.STRING_VAL;
+ value_ = value;
+ }
+
+ public boolean isSetBoolVal() {
+ return setField_ == _Fields.BOOL_VAL;
+ }
+
+
+ public boolean isSetByteVal() {
+ return setField_ == _Fields.BYTE_VAL;
+ }
+
+
+ public boolean isSetI16Val() {
+ return setField_ == _Fields.I16_VAL;
+ }
+
+
+ public boolean isSetI32Val() {
+ return setField_ == _Fields.I32_VAL;
+ }
+
+
+ public boolean isSetI64Val() {
+ return setField_ == _Fields.I64_VAL;
+ }
+
+
+ public boolean isSetDoubleVal() {
+ return setField_ == _Fields.DOUBLE_VAL;
+ }
+
+
+ public boolean isSetStringVal() {
+ return setField_ == _Fields.STRING_VAL;
+ }
+
+
+ public boolean equals(Object other) {
+ if (other instanceof TColumnValue) {
+ return equals((TColumnValue)other);
+ } else {
+ return false;
+ }
+ }
+
+ public boolean equals(TColumnValue other) {
+ return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
+ }
+
+ @Override
+ public int compareTo(TColumnValue other) {
+ int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
+ if (lastComparison == 0) {
+ return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
+ }
+ return lastComparison;
+ }
+
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder hcb = new HashCodeBuilder();
+ hcb.append(this.getClass().getName());
+ org.apache.thrift.TFieldIdEnum setField = getSetField();
+ if (setField != null) {
+ hcb.append(setField.getThriftFieldId());
+ Object value = getFieldValue();
+ if (value instanceof org.apache.thrift.TEnum) {
+ hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue());
+ } else {
+ hcb.append(value);
+ }
+ }
+ return hcb.toHashCode();
+ }
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+}