public BasicJoinIterator(ResultIterator lhsIterator, ResultIterator rhsIterator) {
   this.lhsIterator = lhsIterator;
   this.rhsIterator = rhsIterator;
   this.initialized = false;
   this.lhsTuple = null;
   this.rhsTuple = null;
   this.lhsKey = new JoinKey(lhsKeyExpressions);
   this.rhsKey = new JoinKey(rhsKeyExpressions);
   this.nextLhsTuple = null;
   this.nextRhsTuple = null;
   this.nextLhsKey = new JoinKey(lhsKeyExpressions);
   this.nextRhsKey = new JoinKey(rhsKeyExpressions);
   this.destBitSet = ValueBitSet.newInstance(joinedSchema);
   this.lhsBitSet = ValueBitSet.newInstance(lhsSchema);
   this.rhsBitSet = ValueBitSet.newInstance(rhsSchema);
   lhsBitSet.clear();
   int len = lhsBitSet.getEstimatedLength();
   this.emptyProjectedValue = new byte[len];
   lhsBitSet.toBytes(emptyProjectedValue, 0);
   this.queue = new MappedByteBufferTupleQueue(thresholdBytes);
   this.queueIterator = null;
 }
示例#2
0
 public TupleProjector(ProjectedPTableWrapper projected) {
   List<PColumn> columns = projected.getTable().getColumns();
   expressions = new Expression[columns.size() - projected.getTable().getPKColumns().size()];
   // we do not count minNullableIndex for we might do later merge.
   KeyValueSchemaBuilder builder = new KeyValueSchemaBuilder(0);
   int i = 0;
   for (PColumn column : projected.getTable().getColumns()) {
     if (!SchemaUtil.isPKColumn(column)) {
       builder.addField(column);
       expressions[i++] = projected.getSourceExpression(column);
     }
   }
   schema = builder.build();
   valueSet = ValueBitSet.newInstance(schema);
 }
示例#3
0
 private TupleProjector(KeyValueSchema schema, Expression[] expressions) {
   this.schema = schema;
   this.expressions = expressions;
   this.valueSet = ValueBitSet.newInstance(schema);
 }