示例#1
0
  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;
  }
示例#2
0
  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;
  }
示例#3
0
 /** 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;
   }
 }