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(); }
@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); } if (struct.isSetBinaryColumns()) { optionals.set(1); } if (struct.isSetColumnCount()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetColumns()) { { oprot.writeI32(struct.columns.size()); for (TColumn _iter127 : struct.columns) { _iter127.write(oprot); } } } if (struct.isSetBinaryColumns()) { oprot.writeBinary(struct.binaryColumns); } if (struct.isSetColumnCount()) { oprot.writeI32(struct.columnCount); } }
public boolean equals(TRowSet that) { if (that == null) return false; boolean this_present_startRowOffset = true; boolean that_present_startRowOffset = true; if (this_present_startRowOffset || that_present_startRowOffset) { if (!(this_present_startRowOffset && that_present_startRowOffset)) return false; if (this.startRowOffset != that.startRowOffset) return false; } boolean this_present_rows = true && this.isSetRows(); boolean that_present_rows = true && that.isSetRows(); if (this_present_rows || that_present_rows) { if (!(this_present_rows && that_present_rows)) return false; if (!this.rows.equals(that.rows)) return false; } boolean this_present_columns = true && this.isSetColumns(); boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) return false; if (!this.columns.equals(that.columns)) return false; } boolean this_present_binaryColumns = true && this.isSetBinaryColumns(); boolean that_present_binaryColumns = true && that.isSetBinaryColumns(); if (this_present_binaryColumns || that_present_binaryColumns) { if (!(this_present_binaryColumns && that_present_binaryColumns)) return false; if (!this.binaryColumns.equals(that.binaryColumns)) return false; } boolean this_present_columnCount = true && this.isSetColumnCount(); boolean that_present_columnCount = true && that.isSetColumnCount(); if (this_present_columnCount || that_present_columnCount) { if (!(this_present_columnCount && that_present_columnCount)) return false; if (this.columnCount != that.columnCount) return false; } return true; }
@Override public int compareTo(TRowSet other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetStartRowOffset()).compareTo(other.isSetStartRowOffset()); if (lastComparison != 0) { return lastComparison; } if (isSetStartRowOffset()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRowOffset, other.startRowOffset); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetRows()).compareTo(other.isSetRows()); if (lastComparison != 0) { return lastComparison; } if (isSetRows()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetColumns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetBinaryColumns()).compareTo(other.isSetBinaryColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetBinaryColumns()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryColumns, other.binaryColumns); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumnCount()).compareTo(other.isSetColumnCount()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnCount()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCount, other.columnCount); if (lastComparison != 0) { return lastComparison; } } return 0; }