Пример #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, TExchangeNode struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   {
     oprot.writeI32(struct.input_row_tuples.size());
     for (int _iter148 : struct.input_row_tuples) {
       oprot.writeI32(_iter148);
     }
   }
   BitSet optionals = new BitSet();
   if (struct.isSetSort_info()) {
     optionals.set(0);
   }
   if (struct.isSetOffset()) {
     optionals.set(1);
   }
   oprot.writeBitSet(optionals, 2);
   if (struct.isSetSort_info()) {
     struct.sort_info.write(oprot);
   }
   if (struct.isSetOffset()) {
     oprot.writeI64(struct.offset);
   }
 }
Пример #2
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TExchangeNode struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.input_row_tuples != null) {
        oprot.writeFieldBegin(INPUT_ROW_TUPLES_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.I32, struct.input_row_tuples.size()));
          for (int _iter147 : struct.input_row_tuples) {
            oprot.writeI32(_iter147);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.sort_info != null) {
        if (struct.isSetSort_info()) {
          oprot.writeFieldBegin(SORT_INFO_FIELD_DESC);
          struct.sort_info.write(oprot);
          oprot.writeFieldEnd();
        }
      }
      if (struct.isSetOffset()) {
        oprot.writeFieldBegin(OFFSET_FIELD_DESC);
        oprot.writeI64(struct.offset);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
Пример #3
0
  public boolean equals(TExchangeNode that) {
    if (that == null) return false;

    boolean this_present_input_row_tuples = true && this.isSetInput_row_tuples();
    boolean that_present_input_row_tuples = true && that.isSetInput_row_tuples();
    if (this_present_input_row_tuples || that_present_input_row_tuples) {
      if (!(this_present_input_row_tuples && that_present_input_row_tuples)) return false;
      if (!this.input_row_tuples.equals(that.input_row_tuples)) return false;
    }

    boolean this_present_sort_info = true && this.isSetSort_info();
    boolean that_present_sort_info = true && that.isSetSort_info();
    if (this_present_sort_info || that_present_sort_info) {
      if (!(this_present_sort_info && that_present_sort_info)) return false;
      if (!this.sort_info.equals(that.sort_info)) return false;
    }

    boolean this_present_offset = true && this.isSetOffset();
    boolean that_present_offset = true && that.isSetOffset();
    if (this_present_offset || that_present_offset) {
      if (!(this_present_offset && that_present_offset)) return false;
      if (this.offset != that.offset) return false;
    }

    return true;
  }
Пример #4
0
 /** Performs a deep copy on <i>other</i>. */
 public TExchangeNode(TExchangeNode other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetInput_row_tuples()) {
     List<Integer> __this__input_row_tuples = new ArrayList<Integer>();
     for (Integer other_element : other.input_row_tuples) {
       __this__input_row_tuples.add(other_element);
     }
     this.input_row_tuples = __this__input_row_tuples;
   }
   if (other.isSetSort_info()) {
     this.sort_info = new TSortInfo(other.sort_info);
   }
   this.offset = other.offset;
 }
Пример #5
0
  public int compareTo(TExchangeNode other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    TExchangeNode typedOther = (TExchangeNode) other;

    lastComparison =
        Boolean.valueOf(isSetInput_row_tuples()).compareTo(typedOther.isSetInput_row_tuples());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetInput_row_tuples()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(
              this.input_row_tuples, typedOther.input_row_tuples);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSort_info()).compareTo(typedOther.isSetSort_info());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSort_info()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.sort_info, typedOther.sort_info);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOffset()).compareTo(typedOther.isSetOffset());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOffset()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, typedOther.offset);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }