private int determineUncompressedPartSize() {
    // We will break the uncompressed data in the cache in the chunks that are the size
    // of the prevalent ORC compression buffer (the default), or maximum allocation (since we
    // cannot allocate bigger chunks), whichever is less.
    long orcCbSizeDefault = ((Number)OrcConf.BUFFER_SIZE.getDefaultValue()).longValue();
    int maxAllocSize = cacheWrapper.getAllocator().getMaxAllocation();
    return (int)Math.min(maxAllocSize, orcCbSizeDefault);
  }
To achieve some sort of consistent cache boundaries, we will cache streams deterministically;
in segments starting w/stream start, and going for either stream size or some fixed size.
If we are not reading the entire segment's worth of data, then we will not cache the partial
RGs; the breakage of cache assumptions (no interleaving blocks, etc.) is way too much PITA
to handle just for this case.
We could avoid copy in non-zcr case and manage the buffer that was not allocated by our
allocator. Uncompressed case is not mainline though so let's not complicate it.
@param kind
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/EncodedReaderImpl.java