public void evaluateIntermediate(int groupId, BlockBuilder output)
{
// todo do all of this with shifts and masks
long globalOffset = groupId * ENTRY_SIZE;
int sliceIndex = Ints.checkedCast(globalOffset / SLICE_SIZE);
Slice valueSlice = slices.get(sliceIndex);
int valueOffset = Ints.checkedCast(globalOffset - (sliceIndex * SLICE_SIZE));
if (isNull(valueSlice, valueOffset)) {
output.appendNull();
}
else {
Slice intermediate = valueSlice.slice(valueOffset + 1, ESTIMATOR.getSizeInBytes());
output.append(intermediate); // TODO: add BlockBuilder.appendSlice(slice, offset, length) to avoid creating intermediate slice
}
}