@Override public int getCopySpaceRequired(ITupleReference tuple) { return bytesRequired(tuple); } }
public ConcatenatingTupleReference(int maxTuples) { tuples = new ITupleReference[maxTuples]; fieldCounts = new int[maxTuples]; reset(); }
public LSMRTreeSearchCursor(ILSMIndexOperationContext opCtx, int[] buddyBTreeFields) { super(opCtx); currentCursor = 0; this.btreeTuple = new PermutingTupleReference(buddyBTreeFields); }
@Override public ITupleReference getValue(TxnId txnId, ITupleReference tuple) throws AlgebricksException, HyracksDataException { int numBytes = tupleWriter.bytesRequired(tuple); tupleBytes = new byte[numBytes]; tupleWriter.writeTuple(tuple, tupleBytes, 0); buf = ByteBuffer.wrap(tupleBytes); tupleReference.resetByTupleOffset(buf.array(), 0); return tupleReference; } }
public InMemoryInvertedListCursor(int invListFieldCount, int tokenFieldCount) { int[] fieldPermutation = new int[invListFieldCount]; for (int i = 0; i < invListFieldCount; i++) { fieldPermutation[i] = tokenFieldCount + i; } resultTuple = new PermutingTupleReference(fieldPermutation); // Concatenating the tuple with tokens, and the tuple with inverted-list elements. btreeSearchTuple = new ConcatenatingTupleReference(2); tokenTupleBuilder = new ArrayTupleBuilder(tokenFieldCount); }
public void reset(ITupleReference tuple) { this.tuple = tuple; permutingTuple.reset(tuple); }
public TupleCopyValueExtractor(ITypeTraits[] typeTraits) { this.tupleWriter = new TypeAwareTupleWriter(typeTraits); this.tupleReference = tupleWriter.createTupleReference(); }
@Override public int getCopySpaceRequired(ITupleReference tuple) { return bytesRequired(tuple); } }
@Override public void setFieldCount(int fieldCount) { this.fieldCount = fieldCount; nullFlagsBytes = getNullFlagsBytes(); fieldSlotsBytes = getFieldSlotsBytes(); fieldStartIndex = 0; }
@Override public TypeAwareTupleWriter createTupleWriter() { return new TypeAwareTupleWriter(typeTraits); }
@Override public void setFieldCount(int fieldStartIndex, int fieldCount) { setFieldCount(fieldCount); this.fieldStartIndex = fieldStartIndex; }
@Override public void setFieldCount(int fieldCount) { this.fieldCount = fieldCount; if (decodedFieldSlots == null) { decodedFieldSlots = new int[fieldCount]; } else { if (fieldCount > decodedFieldSlots.length) { decodedFieldSlots = new int[fieldCount]; } } nullFlagsBytes = getNullFlagsBytes(); this.fieldStartIndex = 0; }
@Override public TypeAwareTupleReference createTupleReference() { return new TypeAwareTupleReference(typeTraits); }
@Override public SimpleTupleReference createTupleReference() { return new SimpleTupleReference(); }
public LSMBTreeWithBuddySearchCursor(ILSMIndexOperationContext opCtx, int[] buddyBTreeFields) { super(opCtx); currentCursor = 0; this.buddyBTreeTuple = new PermutingTupleReference(buddyBTreeFields); }
public TypeAwareTupleReference(ITypeTraits[] typeTraits) { this.typeTraits = typeTraits; this.fieldStartIndex = 0; setFieldCount(typeTraits.length); }
public FilterBulkLoader(ILSMComponentFilter filter, ITreeIndex treeIndex, ILSMComponentFilterManager filterManager, int[] indexFields, int[] filterFields, MultiComparator filterCmp) { this.filter = filter; this.treeIndex = treeIndex; this.filterManager = filterManager; this.indexTuple = new PermutingTupleReference(indexFields); this.filterTuple = new PermutingTupleReference(filterFields); this.filterCmp = filterCmp; }
/** * Returns a permuting tuple reference that projects away the document field(s) of a tuple, only leaving the key * fields. */ private PermutingTupleReference createKeysOnlyTupleReference() { // Project away token fields. int[] keyFieldPermutation = new int[invListTypeTraits.length]; int numTokenFields = tokenTypeTraits.length; for (int i = 0; i < invListTypeTraits.length; i++) { keyFieldPermutation[i] = numTokenFields + i; } return new PermutingTupleReference(keyFieldPermutation); }
public DualTupleReference(int[] fieldPermutation) { permutingTuple = new PermutingTupleReference(fieldPermutation); }