Exemple #1
0
  public BNLJoinExec(
      final TaskAttemptContext context,
      final JoinNode join,
      final PhysicalExec outer,
      PhysicalExec inner) {
    super(
        context,
        SchemaUtil.merge(outer.getSchema(), inner.getSchema()),
        SchemaUtil.merge(outer.getSchema(), inner.getSchema()),
        outer,
        inner);
    this.joinQual = join.getJoinQual();
    this.qualCtx = this.joinQual.newContext();
    this.outerTupleSlots = new ArrayList<Tuple>(TUPLE_SLOT_SIZE);
    this.innerTupleSlots = new ArrayList<Tuple>(TUPLE_SLOT_SIZE);
    this.outerIterator = outerTupleSlots.iterator();
    this.innerIterator = innerTupleSlots.iterator();
    this.innerEnd = false;
    this.outerEnd = false;

    // for projection
    targetIds = RowStoreUtil.getTargetIds(inSchema, outSchema);

    // for join
    frameTuple = new FrameTuple();
    outputTuple = new VTuple(outSchema.getColumnNum());
  }