@Override public int decodePositionIndex(long address) { return decodePosition(address); } }
private boolean positionNotDistinctFromCurrentRow(long address, int hashPosition, int position, Page page, byte rawHash, int[] hashChannels) { if (rawHashByHashPosition[hashPosition] != rawHash) { return false; } return hashStrategy.positionNotDistinctFromRow(decodeSliceIndex(address), decodePosition(address), position, page, hashChannels); }
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); }
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 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 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 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); }
@Override public long getRawHash(int groupId) { long address = groupAddressByGroupId.get(groupId); int blockIndex = decodeSliceIndex(address); int position = decodePosition(address); return hashStrategy.hashPosition(blockIndex, position); }
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 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); }
@Override public void appendValuesTo(int groupId, PageBuilder pageBuilder, int outputChannelOffset) { long address = groupAddressByGroupId.get(groupId); int blockIndex = decodeSliceIndex(address); int position = decodePosition(address); hashStrategy.appendTo(blockIndex, position, pageBuilder, outputChannelOffset); }
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); }