presto-orc/src/main/java/io/prestosql/orc/stream/DecimalInputStream.java/DecimalInputStream/seekToCheckpoint
class DecimalInputStream:    @Override
    public void seekToCheckpoint(DecimalStreamCheckpoint checkpoint)
            throws IOException
    {
        long newCheckpoint = checkpoint.getInputStreamCheckpoint();
        // if checkpoint starts at the same compressed position...
        // (we're checking for an empty block because empty blocks signify that we possibly read all the data in the existing
        // buffer, so last checkpoint is no longer valid)
        if (block.length() > 0 && decodeCompressedBlockOffset(newCheckpoint) == decodeCompressedBlockOffset(lastCheckpoint)) {
            // and decompressed position is within our block, reposition in the block directly
            int blockOffset = decodeDecompressedOffset(newCheckpoint) - decodeDecompressedOffset(lastCheckpoint);
            if (blockOffset >= 0 && blockOffset < block.length()) {
                this.blockOffset = blockOffset;
                // do not change last checkpoint because we have not moved positions
                return;
            }
        }
        chunkLoader.seekToCheckpoint(newCheckpoint);
        lastCheckpoint = newCheckpoint;
        block = Slices.EMPTY_SLICE;
        blockOffset = 0;
    }