public DictionaryBlock(int positionCount, Block dictionary, int[] ids) { this(0, positionCount, dictionary, ids, false, randomDictionaryId()); }
public DictionaryBlock(int positionCount, Block dictionary, int[] ids, boolean dictionaryIsCompacted) { this(0, positionCount, dictionary, ids, dictionaryIsCompacted, randomDictionaryId()); }
@Override public DictionaryId apply(DictionaryBlock block) { return dictionarySourceIds.computeIfAbsent(block.getDictionarySourceId(), ignored -> randomDictionaryId()); }
@Override public DictionaryId apply(DictionaryBlock block) { return dictionarySourceIds.computeIfAbsent(block.getDictionarySourceId(), ignored -> randomDictionaryId()); }
/** * Create a new block from the current block by keeping the same elements * only with respect to {@code positions} that starts at {@code offset} and has length of {@code length}. * May return a view over the data in this block or may return a copy */ default Block getPositions(int[] positions, int offset, int length) { checkArrayRange(positions, offset, length); return new DictionaryBlock(offset, length, this, positions, false, randomDictionaryId()); }
@Override public Block getLoadedBlock() { Block loadedDictionary = dictionary.getLoadedBlock(); if (loadedDictionary == dictionary) { return this; } return new DictionaryBlock(idsOffset, getPositionCount(), loadedDictionary, ids, false, randomDictionaryId()); }
DictionaryId newDictionaryId = randomDictionaryId(); for (DictionaryBlock dictionaryBlock : blocks) { if (!firstDictionaryBlock.getDictionarySourceId().equals(dictionaryBlock.getDictionarySourceId())) {
private static DictionaryAwarePageProjection createProjection() { return new DictionaryAwarePageProjection( new TestPageProjection(), block -> randomDictionaryId()); }
private static DictionaryAwarePageProjection createProjection() { return new DictionaryAwarePageProjection( new TestPageProjection(), block -> randomDictionaryId()); }
DictionaryId commonSourceId = randomDictionaryId(); int commonDictionaryUsedPositions = 20; int[] commonDictionaryIds = getDictionaryIds(positionCount, commonDictionaryUsedPositions);
DictionaryId commonSourceId = randomDictionaryId(); int commonDictionaryUsedPositions = 20; int[] commonDictionaryIds = getDictionaryIds(positionCount, commonDictionaryUsedPositions);