Esempio n. 1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TRowSet struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   oprot.writeI64(struct.startRowOffset);
   {
     oprot.writeI32(struct.rows.size());
     for (TRow _iter126 : struct.rows) {
       _iter126.write(oprot);
     }
   }
   BitSet optionals = new BitSet();
   if (struct.isSetColumns()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetColumns()) {
     {
       oprot.writeI32(struct.columns.size());
       for (TColumn _iter127 : struct.columns) {
         _iter127.write(oprot);
       }
     }
   }
 }
Esempio n. 2
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TRowSet struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(START_ROW_OFFSET_FIELD_DESC);
      oprot.writeI64(struct.startRowOffset);
      oprot.writeFieldEnd();
      if (struct.rows != null) {
        oprot.writeFieldBegin(ROWS_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRUCT, struct.rows.size()));
          for (TRow _iter124 : struct.rows) {
            _iter124.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.columns != null) {
        if (struct.isSetColumns()) {
          oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
          {
            oprot.writeListBegin(
                new org.apache.thrift.protocol.TList(
                    org.apache.thrift.protocol.TType.STRUCT, struct.columns.size()));
            for (TColumn _iter125 : struct.columns) {
              _iter125.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
      }
      if (struct.binaryColumns != null) {
        if (struct.isSetBinaryColumns()) {
          oprot.writeFieldBegin(BINARY_COLUMNS_FIELD_DESC);
          oprot.writeBinary(struct.binaryColumns);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetColumnCount()) {
        oprot.writeFieldBegin(COLUMN_COUNT_FIELD_DESC);
        oprot.writeI32(struct.columnCount);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }