Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.0)
0003  *
0004  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0005  *  @generated
0006  */
0007 package org.apache.hive.service.cli.thrift;
0008 
0009 import org.apache.commons.lang.builder.HashCodeBuilder;
0010 import org.apache.thrift.scheme.IScheme;
0011 import org.apache.thrift.scheme.SchemeFactory;
0012 import org.apache.thrift.scheme.StandardScheme;
0013 
0014 import org.apache.thrift.scheme.TupleScheme;
0015 import org.apache.thrift.protocol.TTupleProtocol;
0016 import org.apache.thrift.protocol.TProtocolException;
0017 import org.apache.thrift.EncodingUtils;
0018 import org.apache.thrift.TException;
0019 import java.util.List;
0020 import java.util.ArrayList;
0021 import java.util.Map;
0022 import java.util.HashMap;
0023 import java.util.EnumMap;
0024 import java.util.Set;
0025 import java.util.HashSet;
0026 import java.util.EnumSet;
0027 import java.util.Collections;
0028 import java.util.BitSet;
0029 import java.nio.ByteBuffer;
0030 import java.util.Arrays;
0031 import org.slf4j.Logger;
0032 import org.slf4j.LoggerFactory;
0033 
0034 public class TRowSet implements org.apache.thrift.TBase<TRowSet, TRowSet._Fields>, java.io.Serializable, Cloneable {
0035   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowSet");
0036 
0037   private static final org.apache.thrift.protocol.TField START_ROW_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("startRowOffset", org.apache.thrift.protocol.TType.I64, (short)1);
0038   private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2);
0039   private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3);
0040 
0041   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
0042   static {
0043     schemes.put(StandardScheme.class, new TRowSetStandardSchemeFactory());
0044     schemes.put(TupleScheme.class, new TRowSetTupleSchemeFactory());
0045   }
0046 
0047   private long startRowOffset; // required
0048   private List<TRow> rows; // required
0049   private List<TColumn> columns; // optional
0050 
0051   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
0052   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0053     START_ROW_OFFSET((short)1, "startRowOffset"),
0054     ROWS((short)2, "rows"),
0055     COLUMNS((short)3, "columns");
0056 
0057     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0058 
0059     static {
0060       for (_Fields field : EnumSet.allOf(_Fields.class)) {
0061         byName.put(field.getFieldName(), field);
0062       }
0063     }
0064 
0065     /**
0066      * Find the _Fields constant that matches fieldId, or null if its not found.
0067      */
0068     public static _Fields findByThriftId(int fieldId) {
0069       switch(fieldId) {
0070         case 1: // START_ROW_OFFSET
0071           return START_ROW_OFFSET;
0072         case 2: // ROWS
0073           return ROWS;
0074         case 3: // COLUMNS
0075           return COLUMNS;
0076         default:
0077           return null;
0078       }
0079     }
0080 
0081     /**
0082      * Find the _Fields constant that matches fieldId, throwing an exception
0083      * if it is not found.
0084      */
0085     public static _Fields findByThriftIdOrThrow(int fieldId) {
0086       _Fields fields = findByThriftId(fieldId);
0087       if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0088       return fields;
0089     }
0090 
0091     /**
0092      * Find the _Fields constant that matches name, or null if its not found.
0093      */
0094     public static _Fields findByName(String name) {
0095       return byName.get(name);
0096     }
0097 
0098     private final short _thriftId;
0099     private final String _fieldName;
0100 
0101     _Fields(short thriftId, String fieldName) {
0102       _thriftId = thriftId;
0103       _fieldName = fieldName;
0104     }
0105 
0106     public short getThriftFieldId() {
0107       return _thriftId;
0108     }
0109 
0110     public String getFieldName() {
0111       return _fieldName;
0112     }
0113   }
0114 
0115   // isset id assignments
0116   private static final int __STARTROWOFFSET_ISSET_ID = 0;
0117   private byte __isset_bitfield = 0;
0118   private _Fields optionals[] = {_Fields.COLUMNS};
0119   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0120   static {
0121     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0122     tmpMap.put(_Fields.START_ROW_OFFSET, new org.apache.thrift.meta_data.FieldMetaData("startRowOffset", org.apache.thrift.TFieldRequirementType.REQUIRED, 
0123         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
0124     tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.REQUIRED, 
0125         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
0126             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRow.class))));
0127     tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0128         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
0129             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TColumn.class))));
0130     metaDataMap = Collections.unmodifiableMap(tmpMap);
0131     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRowSet.class, metaDataMap);
0132   }
0133 
0134   public TRowSet() {
0135   }
0136 
0137   public TRowSet(
0138     long startRowOffset,
0139     List<TRow> rows)
0140   {
0141     this();
0142     this.startRowOffset = startRowOffset;
0143     setStartRowOffsetIsSet(true);
0144     this.rows = rows;
0145   }
0146 
0147   /**
0148    * Performs a deep copy on <i>other</i>.
0149    */
0150   public TRowSet(TRowSet other) {
0151     __isset_bitfield = other.__isset_bitfield;
0152     this.startRowOffset = other.startRowOffset;
0153     if (other.isSetRows()) {
0154       List<TRow> __this__rows = new ArrayList<TRow>();
0155       for (TRow other_element : other.rows) {
0156         __this__rows.add(new TRow(other_element));
0157       }
0158       this.rows = __this__rows;
0159     }
0160     if (other.isSetColumns()) {
0161       List<TColumn> __this__columns = new ArrayList<TColumn>();
0162       for (TColumn other_element : other.columns) {
0163         __this__columns.add(new TColumn(other_element));
0164       }
0165       this.columns = __this__columns;
0166     }
0167   }
0168 
0169   public TRowSet deepCopy() {
0170     return new TRowSet(this);
0171   }
0172 
0173   @Override
0174   public void clear() {
0175     setStartRowOffsetIsSet(false);
0176     this.startRowOffset = 0;
0177     this.rows = null;
0178     this.columns = null;
0179   }
0180 
0181   public long getStartRowOffset() {
0182     return this.startRowOffset;
0183   }
0184 
0185   public void setStartRowOffset(long startRowOffset) {
0186     this.startRowOffset = startRowOffset;
0187     setStartRowOffsetIsSet(true);
0188   }
0189 
0190   public void unsetStartRowOffset() {
0191     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTROWOFFSET_ISSET_ID);
0192   }
0193 
0194   /** Returns true if field startRowOffset is set (has been assigned a value) and false otherwise */
0195   public boolean isSetStartRowOffset() {
0196     return EncodingUtils.testBit(__isset_bitfield, __STARTROWOFFSET_ISSET_ID);
0197   }
0198 
0199   public void setStartRowOffsetIsSet(boolean value) {
0200     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTROWOFFSET_ISSET_ID, value);
0201   }
0202 
0203   public int getRowsSize() {
0204     return (this.rows == null) ? 0 : this.rows.size();
0205   }
0206 
0207   public java.util.Iterator<TRow> getRowsIterator() {
0208     return (this.rows == null) ? null : this.rows.iterator();
0209   }
0210 
0211   public void addToRows(TRow elem) {
0212     if (this.rows == null) {
0213       this.rows = new ArrayList<TRow>();
0214     }
0215     this.rows.add(elem);
0216   }
0217 
0218   public List<TRow> getRows() {
0219     return this.rows;
0220   }
0221 
0222   public void setRows(List<TRow> rows) {
0223     this.rows = rows;
0224   }
0225 
0226   public void unsetRows() {
0227     this.rows = null;
0228   }
0229 
0230   /** Returns true if field rows is set (has been assigned a value) and false otherwise */
0231   public boolean isSetRows() {
0232     return this.rows != null;
0233   }
0234 
0235   public void setRowsIsSet(boolean value) {
0236     if (!value) {
0237       this.rows = null;
0238     }
0239   }
0240 
0241   public int getColumnsSize() {
0242     return (this.columns == null) ? 0 : this.columns.size();
0243   }
0244 
0245   public java.util.Iterator<TColumn> getColumnsIterator() {
0246     return (this.columns == null) ? null : this.columns.iterator();
0247   }
0248 
0249   public void addToColumns(TColumn elem) {
0250     if (this.columns == null) {
0251       this.columns = new ArrayList<TColumn>();
0252     }
0253     this.columns.add(elem);
0254   }
0255 
0256   public List<TColumn> getColumns() {
0257     return this.columns;
0258   }
0259 
0260   public void setColumns(List<TColumn> columns) {
0261     this.columns = columns;
0262   }
0263 
0264   public void unsetColumns() {
0265     this.columns = null;
0266   }
0267 
0268   /** Returns true if field columns is set (has been assigned a value) and false otherwise */
0269   public boolean isSetColumns() {
0270     return this.columns != null;
0271   }
0272 
0273   public void setColumnsIsSet(boolean value) {
0274     if (!value) {
0275       this.columns = null;
0276     }
0277   }
0278 
0279   public void setFieldValue(_Fields field, Object value) {
0280     switch (field) {
0281     case START_ROW_OFFSET:
0282       if (value == null) {
0283         unsetStartRowOffset();
0284       } else {
0285         setStartRowOffset((Long)value);
0286       }
0287       break;
0288 
0289     case ROWS:
0290       if (value == null) {
0291         unsetRows();
0292       } else {
0293         setRows((List<TRow>)value);
0294       }
0295       break;
0296 
0297     case COLUMNS:
0298       if (value == null) {
0299         unsetColumns();
0300       } else {
0301         setColumns((List<TColumn>)value);
0302       }
0303       break;
0304 
0305     }
0306   }
0307 
0308   public Object getFieldValue(_Fields field) {
0309     switch (field) {
0310     case START_ROW_OFFSET:
0311       return Long.valueOf(getStartRowOffset());
0312 
0313     case ROWS:
0314       return getRows();
0315 
0316     case COLUMNS:
0317       return getColumns();
0318 
0319     }
0320     throw new IllegalStateException();
0321   }
0322 
0323   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
0324   public boolean isSet(_Fields field) {
0325     if (field == null) {
0326       throw new IllegalArgumentException();
0327     }
0328 
0329     switch (field) {
0330     case START_ROW_OFFSET:
0331       return isSetStartRowOffset();
0332     case ROWS:
0333       return isSetRows();
0334     case COLUMNS:
0335       return isSetColumns();
0336     }
0337     throw new IllegalStateException();
0338   }
0339 
0340   @Override
0341   public boolean equals(Object that) {
0342     if (that == null)
0343       return false;
0344     if (that instanceof TRowSet)
0345       return this.equals((TRowSet)that);
0346     return false;
0347   }
0348 
0349   public boolean equals(TRowSet that) {
0350     if (that == null)
0351       return false;
0352 
0353     boolean this_present_startRowOffset = true;
0354     boolean that_present_startRowOffset = true;
0355     if (this_present_startRowOffset || that_present_startRowOffset) {
0356       if (!(this_present_startRowOffset && that_present_startRowOffset))
0357         return false;
0358       if (this.startRowOffset != that.startRowOffset)
0359         return false;
0360     }
0361 
0362     boolean this_present_rows = true && this.isSetRows();
0363     boolean that_present_rows = true && that.isSetRows();
0364     if (this_present_rows || that_present_rows) {
0365       if (!(this_present_rows && that_present_rows))
0366         return false;
0367       if (!this.rows.equals(that.rows))
0368         return false;
0369     }
0370 
0371     boolean this_present_columns = true && this.isSetColumns();
0372     boolean that_present_columns = true && that.isSetColumns();
0373     if (this_present_columns || that_present_columns) {
0374       if (!(this_present_columns && that_present_columns))
0375         return false;
0376       if (!this.columns.equals(that.columns))
0377         return false;
0378     }
0379 
0380     return true;
0381   }
0382 
0383   @Override
0384   public int hashCode() {
0385     HashCodeBuilder builder = new HashCodeBuilder();
0386 
0387     boolean present_startRowOffset = true;
0388     builder.append(present_startRowOffset);
0389     if (present_startRowOffset)
0390       builder.append(startRowOffset);
0391 
0392     boolean present_rows = true && (isSetRows());
0393     builder.append(present_rows);
0394     if (present_rows)
0395       builder.append(rows);
0396 
0397     boolean present_columns = true && (isSetColumns());
0398     builder.append(present_columns);
0399     if (present_columns)
0400       builder.append(columns);
0401 
0402     return builder.toHashCode();
0403   }
0404 
0405   public int compareTo(TRowSet other) {
0406     if (!getClass().equals(other.getClass())) {
0407       return getClass().getName().compareTo(other.getClass().getName());
0408     }
0409 
0410     int lastComparison = 0;
0411     TRowSet typedOther = (TRowSet)other;
0412 
0413     lastComparison = Boolean.valueOf(isSetStartRowOffset()).compareTo(typedOther.isSetStartRowOffset());
0414     if (lastComparison != 0) {
0415       return lastComparison;
0416     }
0417     if (isSetStartRowOffset()) {
0418       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRowOffset, typedOther.startRowOffset);
0419       if (lastComparison != 0) {
0420         return lastComparison;
0421       }
0422     }
0423     lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows());
0424     if (lastComparison != 0) {
0425       return lastComparison;
0426     }
0427     if (isSetRows()) {
0428       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows);
0429       if (lastComparison != 0) {
0430         return lastComparison;
0431       }
0432     }
0433     lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns());
0434     if (lastComparison != 0) {
0435       return lastComparison;
0436     }
0437     if (isSetColumns()) {
0438       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
0439       if (lastComparison != 0) {
0440         return lastComparison;
0441       }
0442     }
0443     return 0;
0444   }
0445 
0446   public _Fields fieldForId(int fieldId) {
0447     return _Fields.findByThriftId(fieldId);
0448   }
0449 
0450   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
0451     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
0452   }
0453 
0454   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0455     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
0456   }
0457 
0458   @Override
0459   public String toString() {
0460     StringBuilder sb = new StringBuilder("TRowSet(");
0461     boolean first = true;
0462 
0463     sb.append("startRowOffset:");
0464     sb.append(this.startRowOffset);
0465     first = false;
0466     if (!first) sb.append(", ");
0467     sb.append("rows:");
0468     if (this.rows == null) {
0469       sb.append("null");
0470     } else {
0471       sb.append(this.rows);
0472     }
0473     first = false;
0474     if (isSetColumns()) {
0475       if (!first) sb.append(", ");
0476       sb.append("columns:");
0477       if (this.columns == null) {
0478         sb.append("null");
0479       } else {
0480         sb.append(this.columns);
0481       }
0482       first = false;
0483     }
0484     sb.append(")");
0485     return sb.toString();
0486   }
0487 
0488   public void validate() throws org.apache.thrift.TException {
0489     // check for required fields
0490     if (!isSetStartRowOffset()) {
0491       throw new org.apache.thrift.protocol.TProtocolException("Required field 'startRowOffset' is unset! Struct:" + toString());
0492     }
0493 
0494     if (!isSetRows()) {
0495       throw new org.apache.thrift.protocol.TProtocolException("Required field 'rows' is unset! Struct:" + toString());
0496     }
0497 
0498     // check for sub-struct validity
0499   }
0500 
0501   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0502     try {
0503       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0504     } catch (org.apache.thrift.TException te) {
0505       throw new java.io.IOException(te);
0506     }
0507   }
0508 
0509   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0510     try {
0511       // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
0512       __isset_bitfield = 0;
0513       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0514     } catch (org.apache.thrift.TException te) {
0515       throw new java.io.IOException(te);
0516     }
0517   }
0518 
0519   private static class TRowSetStandardSchemeFactory implements SchemeFactory {
0520     public TRowSetStandardScheme getScheme() {
0521       return new TRowSetStandardScheme();
0522     }
0523   }
0524 
0525   private static class TRowSetStandardScheme extends StandardScheme<TRowSet> {
0526 
0527     public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) throws org.apache.thrift.TException {
0528       org.apache.thrift.protocol.TField schemeField;
0529       iprot.readStructBegin();
0530       while (true)
0531       {
0532         schemeField = iprot.readFieldBegin();
0533         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
0534           break;
0535         }
0536         switch (schemeField.id) {
0537           case 1: // START_ROW_OFFSET
0538             if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
0539               struct.startRowOffset = iprot.readI64();
0540               struct.setStartRowOffsetIsSet(true);
0541             } else { 
0542               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0543             }
0544             break;
0545           case 2: // ROWS
0546             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
0547               {
0548                 org.apache.thrift.protocol.TList _list118 = iprot.readListBegin();
0549                 struct.rows = new ArrayList<TRow>(_list118.size);
0550                 for (int _i119 = 0; _i119 < _list118.size; ++_i119)
0551                 {
0552                   TRow _elem120; // optional
0553                   _elem120 = new TRow();
0554                   _elem120.read(iprot);
0555                   struct.rows.add(_elem120);
0556                 }
0557                 iprot.readListEnd();
0558               }
0559               struct.setRowsIsSet(true);
0560             } else { 
0561               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0562             }
0563             break;
0564           case 3: // COLUMNS
0565             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
0566               {
0567                 org.apache.thrift.protocol.TList _list121 = iprot.readListBegin();
0568                 struct.columns = new ArrayList<TColumn>(_list121.size);
0569                 for (int _i122 = 0; _i122 < _list121.size; ++_i122)
0570                 {
0571                   TColumn _elem123; // optional
0572                   _elem123 = new TColumn();
0573                   _elem123.read(iprot);
0574                   struct.columns.add(_elem123);
0575                 }
0576                 iprot.readListEnd();
0577               }
0578               struct.setColumnsIsSet(true);
0579             } else { 
0580               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0581             }
0582             break;
0583           default:
0584             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0585         }
0586         iprot.readFieldEnd();
0587       }
0588       iprot.readStructEnd();
0589       struct.validate();
0590     }
0591 
0592     public void write(org.apache.thrift.protocol.TProtocol oprot, TRowSet struct) throws org.apache.thrift.TException {
0593       struct.validate();
0594 
0595       oprot.writeStructBegin(STRUCT_DESC);
0596       oprot.writeFieldBegin(START_ROW_OFFSET_FIELD_DESC);
0597       oprot.writeI64(struct.startRowOffset);
0598       oprot.writeFieldEnd();
0599       if (struct.rows != null) {
0600         oprot.writeFieldBegin(ROWS_FIELD_DESC);
0601         {
0602           oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rows.size()));
0603           for (TRow _iter124 : struct.rows)
0604           {
0605             _iter124.write(oprot);
0606           }
0607           oprot.writeListEnd();
0608         }
0609         oprot.writeFieldEnd();
0610       }
0611       if (struct.columns != null) {
0612         if (struct.isSetColumns()) {
0613           oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
0614           {
0615             oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
0616             for (TColumn _iter125 : struct.columns)
0617             {
0618               _iter125.write(oprot);
0619             }
0620             oprot.writeListEnd();
0621           }
0622           oprot.writeFieldEnd();
0623         }
0624       }
0625       oprot.writeFieldStop();
0626       oprot.writeStructEnd();
0627     }
0628 
0629   }
0630 
0631   private static class TRowSetTupleSchemeFactory implements SchemeFactory {
0632     public TRowSetTupleScheme getScheme() {
0633       return new TRowSetTupleScheme();
0634     }
0635   }
0636 
0637   private static class TRowSetTupleScheme extends TupleScheme<TRowSet> {
0638 
0639     @Override
0640     public void write(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) throws org.apache.thrift.TException {
0641       TTupleProtocol oprot = (TTupleProtocol) prot;
0642       oprot.writeI64(struct.startRowOffset);
0643       {
0644         oprot.writeI32(struct.rows.size());
0645         for (TRow _iter126 : struct.rows)
0646         {
0647           _iter126.write(oprot);
0648         }
0649       }
0650       BitSet optionals = new BitSet();
0651       if (struct.isSetColumns()) {
0652         optionals.set(0);
0653       }
0654       oprot.writeBitSet(optionals, 1);
0655       if (struct.isSetColumns()) {
0656         {
0657           oprot.writeI32(struct.columns.size());
0658           for (TColumn _iter127 : struct.columns)
0659           {
0660             _iter127.write(oprot);
0661           }
0662         }
0663       }
0664     }
0665 
0666     @Override
0667     public void read(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) throws org.apache.thrift.TException {
0668       TTupleProtocol iprot = (TTupleProtocol) prot;
0669       struct.startRowOffset = iprot.readI64();
0670       struct.setStartRowOffsetIsSet(true);
0671       {
0672         org.apache.thrift.protocol.TList _list128 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
0673         struct.rows = new ArrayList<TRow>(_list128.size);
0674         for (int _i129 = 0; _i129 < _list128.size; ++_i129)
0675         {
0676           TRow _elem130; // optional
0677           _elem130 = new TRow();
0678           _elem130.read(iprot);
0679           struct.rows.add(_elem130);
0680         }
0681       }
0682       struct.setRowsIsSet(true);
0683       BitSet incoming = iprot.readBitSet(1);
0684       if (incoming.get(0)) {
0685         {
0686           org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
0687           struct.columns = new ArrayList<TColumn>(_list131.size);
0688           for (int _i132 = 0; _i132 < _list131.size; ++_i132)
0689           {
0690             TColumn _elem133; // optional
0691             _elem133 = new TColumn();
0692             _elem133.read(iprot);
0693             struct.columns.add(_elem133);
0694           }
0695         }
0696         struct.setColumnsIsSet(true);
0697       }
0698     }
0699   }
0700 
0701 }
0702