Javadoc
Gets file data for particular offsets. The range list is modified in place; it is then
returned (since the list head could have changed). Ranges are replaced with cached ranges.
Any such buffer is locked in cache to prevent eviction, and must therefore be released
back to cache via a corresponding call (releaseBuffer) when the caller is done with it.
In case of partial overlap with cached data, full cache blocks are always returned;
there's no capacity for partial matches in return type. The rules are as follows:
1) If the requested range starts in the middle of a cached range, that cached range will not
be returned by default (e.g. if [100,200) and [200,300) are cached, the request for
[150,300) will only return [200,300) from cache). This may be configurable in impls.
This is because we assume well-known range start offsets are used (rg/stripe offsets), so
a request from the middle of the start doesn't make sense.
2) If the requested range ends in the middle of a cached range, that entire cached range will
be returned (e.g. if [100,200) and [200,300) are cached, the request for [100,250) will
return both ranges). It should really be same as #1, however currently ORC uses estimated
end offsets; if we don't return the end block, the caller may read it from disk needlessly.