@Override public void write(org.apache.thrift.protocol.TProtocol prot, THashJoinNode struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.join_op.getValue()); { oprot.writeI32(struct.eq_join_conjuncts.size()); for (TEqJoinCondition _iter16 : struct.eq_join_conjuncts) { _iter16.write(oprot); } } BitSet optionals = new BitSet(); if (struct.isSetOther_join_conjuncts()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetOther_join_conjuncts()) { { oprot.writeI32(struct.other_join_conjuncts.size()); for (com.cloudera.impala.thrift.TExpr _iter17 : struct.other_join_conjuncts) { _iter17.write(oprot); } } } }
public boolean equals(THashJoinNode that) { if (that == null) return false; boolean this_present_join_op = true && this.isSetJoin_op(); boolean that_present_join_op = true && that.isSetJoin_op(); if (this_present_join_op || that_present_join_op) { if (!(this_present_join_op && that_present_join_op)) return false; if (!this.join_op.equals(that.join_op)) return false; } boolean this_present_eq_join_conjuncts = true && this.isSetEq_join_conjuncts(); boolean that_present_eq_join_conjuncts = true && that.isSetEq_join_conjuncts(); if (this_present_eq_join_conjuncts || that_present_eq_join_conjuncts) { if (!(this_present_eq_join_conjuncts && that_present_eq_join_conjuncts)) return false; if (!this.eq_join_conjuncts.equals(that.eq_join_conjuncts)) return false; } boolean this_present_other_join_conjuncts = true && this.isSetOther_join_conjuncts(); boolean that_present_other_join_conjuncts = true && that.isSetOther_join_conjuncts(); if (this_present_other_join_conjuncts || that_present_other_join_conjuncts) { if (!(this_present_other_join_conjuncts && that_present_other_join_conjuncts)) return false; if (!this.other_join_conjuncts.equals(that.other_join_conjuncts)) return false; } return true; }
/** Performs a deep copy on <i>other</i>. */ public THashJoinNode(THashJoinNode other) { if (other.isSetJoin_op()) { this.join_op = other.join_op; } if (other.isSetEq_join_conjuncts()) { List<TEqJoinCondition> __this__eq_join_conjuncts = new ArrayList<TEqJoinCondition>(); for (TEqJoinCondition other_element : other.eq_join_conjuncts) { __this__eq_join_conjuncts.add(new TEqJoinCondition(other_element)); } this.eq_join_conjuncts = __this__eq_join_conjuncts; } if (other.isSetOther_join_conjuncts()) { List<com.cloudera.impala.thrift.TExpr> __this__other_join_conjuncts = new ArrayList<com.cloudera.impala.thrift.TExpr>(); for (com.cloudera.impala.thrift.TExpr other_element : other.other_join_conjuncts) { __this__other_join_conjuncts.add(new com.cloudera.impala.thrift.TExpr(other_element)); } this.other_join_conjuncts = __this__other_join_conjuncts; } }
public void write(org.apache.thrift.protocol.TProtocol oprot, THashJoinNode struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.join_op != null) { oprot.writeFieldBegin(JOIN_OP_FIELD_DESC); oprot.writeI32(struct.join_op.getValue()); oprot.writeFieldEnd(); } if (struct.eq_join_conjuncts != null) { oprot.writeFieldBegin(EQ_JOIN_CONJUNCTS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, struct.eq_join_conjuncts.size())); for (TEqJoinCondition _iter14 : struct.eq_join_conjuncts) { _iter14.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.other_join_conjuncts != null) { if (struct.isSetOther_join_conjuncts()) { oprot.writeFieldBegin(OTHER_JOIN_CONJUNCTS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, struct.other_join_conjuncts.size())); for (com.cloudera.impala.thrift.TExpr _iter15 : struct.other_join_conjuncts) { _iter15.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public int compareTo(THashJoinNode other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; THashJoinNode typedOther = (THashJoinNode) other; lastComparison = Boolean.valueOf(isSetJoin_op()).compareTo(typedOther.isSetJoin_op()); if (lastComparison != 0) { return lastComparison; } if (isSetJoin_op()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.join_op, typedOther.join_op); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEq_join_conjuncts()).compareTo(typedOther.isSetEq_join_conjuncts()); if (lastComparison != 0) { return lastComparison; } if (isSetEq_join_conjuncts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.eq_join_conjuncts, typedOther.eq_join_conjuncts); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetOther_join_conjuncts()) .compareTo(typedOther.isSetOther_join_conjuncts()); if (lastComparison != 0) { return lastComparison; } if (isSetOther_join_conjuncts()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo( this.other_join_conjuncts, typedOther.other_join_conjuncts); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, THashJoinNode struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.join_op = TJoinOp.findByValue(iprot.readI32()); struct.setJoin_opIsSet(true); { org.apache.thrift.protocol.TList _list18 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.eq_join_conjuncts = new ArrayList<TEqJoinCondition>(_list18.size); for (int _i19 = 0; _i19 < _list18.size; ++_i19) { TEqJoinCondition _elem20; // required _elem20 = new TEqJoinCondition(); _elem20.read(iprot); struct.eq_join_conjuncts.add(_elem20); } } struct.setEq_join_conjunctsIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.other_join_conjuncts = new ArrayList<com.cloudera.impala.thrift.TExpr>(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { com.cloudera.impala.thrift.TExpr _elem23; // required _elem23 = new com.cloudera.impala.thrift.TExpr(); _elem23.read(iprot); struct.other_join_conjuncts.add(_elem23); } } struct.setOther_join_conjunctsIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, THashJoinNode 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: // JOIN_OP if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.join_op = TJoinOp.findByValue(iprot.readI32()); struct.setJoin_opIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // EQ_JOIN_CONJUNCTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list8 = iprot.readListBegin(); struct.eq_join_conjuncts = new ArrayList<TEqJoinCondition>(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { TEqJoinCondition _elem10; // required _elem10 = new TEqJoinCondition(); _elem10.read(iprot); struct.eq_join_conjuncts.add(_elem10); } iprot.readListEnd(); } struct.setEq_join_conjunctsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // OTHER_JOIN_CONJUNCTS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(); struct.other_join_conjuncts = new ArrayList<com.cloudera.impala.thrift.TExpr>(_list11.size); for (int _i12 = 0; _i12 < _list11.size; ++_i12) { com.cloudera.impala.thrift.TExpr _elem13; // required _elem13 = new com.cloudera.impala.thrift.TExpr(); _elem13.read(iprot); struct.other_join_conjuncts.add(_elem13); } iprot.readListEnd(); } struct.setOther_join_conjunctsIsSet(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(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }