@Override public boolean filter(int leftPosition, int rightPosition, Page rightPage) { long pageAddress = addresses.getLong(leftPosition); int pageIndex = decodeSliceIndex(pageAddress); int pagePosition = decodePosition(pageAddress); return filterFunction.filter(pagePosition, pages.isEmpty() ? EMPTY_PAGE : pages.get(pageIndex), rightPosition, rightPage); } }
private double getRadius(int joinPosition) { long joinAddress = addresses.getLong(joinPosition); int blockIndex = decodeSliceIndex(joinAddress); int blockPosition = decodePosition(joinAddress); return DOUBLE.getDouble(channels.get(radiusChannel).get(blockIndex), blockPosition); }
public void appendTo(long position, PageBuilder pageBuilder, int outputChannelOffset) { long pageAddress = addresses.getLong(toIntExact(position)); int blockIndex = decodeSliceIndex(pageAddress); int blockPosition = decodePosition(pageAddress); pagesHashStrategy.appendTo(blockIndex, blockPosition, pageBuilder, outputChannelOffset); }
@Override public int compare(int leftPosition, int rightPosition) { long leftPageAddress = addresses.getLong(leftPosition); int leftBlockIndex = decodeSliceIndex(leftPageAddress); int leftBlockPosition = decodePosition(leftPageAddress); long rightPageAddress = addresses.getLong(rightPosition); int rightBlockIndex = decodeSliceIndex(rightPageAddress); int rightBlockPosition = decodePosition(rightPageAddress); return pagesHashStrategy.compareSortChannelPositions(leftBlockIndex, leftBlockPosition, rightBlockIndex, rightBlockPosition); }
private boolean positionEqualsPositionIgnoreNulls(int leftPosition, int rightPosition) { long leftPageAddress = addresses.getLong(leftPosition); int leftBlockIndex = decodeSliceIndex(leftPageAddress); int leftBlockPosition = decodePosition(leftPageAddress); long rightPageAddress = addresses.getLong(rightPosition); int rightBlockIndex = decodeSliceIndex(rightPageAddress); int rightBlockPosition = decodePosition(rightPageAddress); return pagesHashStrategy.positionEqualsPositionIgnoreNulls(leftBlockIndex, leftBlockPosition, rightBlockIndex, rightBlockPosition); }
public boolean positionEqualsPosition(PagesHashStrategy partitionHashStrategy, int leftPosition, int rightPosition) { long leftAddress = valueAddresses.getLong(leftPosition); int leftPageIndex = decodeSliceIndex(leftAddress); int leftPagePosition = decodePosition(leftAddress); long rightAddress = valueAddresses.getLong(rightPosition); int rightPageIndex = decodeSliceIndex(rightAddress); int rightPagePosition = decodePosition(rightAddress); return partitionHashStrategy.positionEqualsPosition(leftPageIndex, leftPagePosition, rightPageIndex, rightPagePosition); }
@Override public void appendTo(int joinPosition, PageBuilder pageBuilder, int outputChannelOffset) { long joinAddress = addresses.getLong(joinPosition); int blockIndex = decodeSliceIndex(joinAddress); int blockPosition = decodePosition(joinAddress); for (int outputIndex : outputChannels) { Type type = types.get(outputIndex); List<Block> channel = channels.get(outputIndex); Block block = channel.get(blockIndex); type.appendTo(block, blockPosition, pageBuilder.getBlockBuilder(outputChannelOffset)); outputChannelOffset++; } } }
public boolean getBoolean(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return types.get(channel).getBoolean(block, blockPosition); }
private boolean isPositionNull(int position) { long pageAddress = addresses.getLong(position); int blockIndex = decodeSliceIndex(pageAddress); int blockPosition = decodePosition(pageAddress); return pagesHashStrategy.isPositionNull(blockIndex, blockPosition); }
public Object getObject(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return types.get(channel).getObject(block, blockPosition); }
public void appendTo(int channel, int position, BlockBuilder output) { long pageAddress = valueAddresses.getLong(position); Type type = types.get(channel); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); type.appendTo(block, blockPosition, output); }
public double getDouble(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return types.get(channel).getDouble(block, blockPosition); }
public long getLong(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return types.get(channel).getLong(block, blockPosition); }
public Slice getSlice(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return types.get(channel).getSlice(block, blockPosition); }
public boolean positionEqualsRow(PagesHashStrategy pagesHashStrategy, int indexPosition, int rightPosition, Page rightPage) { long pageAddress = valueAddresses.getLong(indexPosition); int pageIndex = decodeSliceIndex(pageAddress); int pagePosition = decodePosition(pageAddress); return pagesHashStrategy.positionEqualsRow(pageIndex, pagePosition, rightPosition, rightPage); }
private boolean isNull(int position) { long pageAddress = addresses.getLong(position); int blockIndex = decodeSliceIndex(pageAddress); int blockPosition = decodePosition(pageAddress); return pagesHashStrategy.isSortChannelPositionNull(blockIndex, blockPosition); }
private long readHashPosition(int position) { long pageAddress = addresses.getLong(position); int blockIndex = decodeSliceIndex(pageAddress); int blockPosition = decodePosition(pageAddress); return pagesHashStrategy.hashPosition(blockIndex, blockPosition); }
private boolean positionEqualsCurrentRowIgnoreNulls(int leftPosition, byte rawHash, int rightPosition, Page rightPage) { if (positionToHashes[leftPosition] != rawHash) { return false; } long pageAddress = addresses.getLong(leftPosition); int blockIndex = decodeSliceIndex(pageAddress); int blockPosition = decodePosition(pageAddress); return pagesHashStrategy.positionEqualsRowIgnoreNulls(blockIndex, blockPosition, rightPosition, rightPage); }
public Block getSingleValueBlock(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return block.getSingleValueBlock(blockPosition); }
public boolean isNull(int channel, int position) { long pageAddress = valueAddresses.getLong(position); Block block = channels[channel].get(decodeSliceIndex(pageAddress)); int blockPosition = decodePosition(pageAddress); return block.isNull(blockPosition); }