Exemple #1
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);
   }
 }
Exemple #2
0
    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();
    }