presto-orc/src/main/java/io/prestosql/orc/stream/OrcInputStream.java/OrcInputStream/seekToCheckpoint
class OrcInputStream:    public void seekToCheckpoint(long checkpoint)
            throws IOException
    {
        int compressedOffset = decodeCompressedBlockOffset(checkpoint);
        int decompressedOffset = decodeDecompressedOffset(checkpoint);
        // if checkpoint is within the current buffer, seek locally
        int currentDecompressedBufferOffset = decodeDecompressedOffset(lastCheckpoint);
        if (current != null && compressedOffset == decodeCompressedBlockOffset(lastCheckpoint) && decompressedOffset < currentDecompressedBufferOffset + current.length()) {
            current.setPosition(decompressedOffset - currentDecompressedBufferOffset);
            return;
        }
        else {
            // otherwise, drop the current buffer and seek the underlying data loader
            current = EMPTY_SLICE.getInput();
            chunkLoader.seekToCheckpoint(checkpoint);
        }
        lastCheckpoint = checkpoint;
    }