dongjoon-hyun commented on a change in pull request #695:
URL: https://github.com/apache/orc/pull/695#discussion_r627086169
##########
File path: c++/src/Compression.cc
##########
@@ -503,16 +532,47 @@ DIAGNOSTIC_PUSH
return true;
}
+ /** There are three possible scenarios when seeking a position:
+ * 1. The seeked position is already read and decompressed into
+ * the output stream.
+ * 2. It is already read from the input stream, but has not been
+ * decompressed yet, ie. it's not in the output stream.
+ * 3. It is not read yet from the inputstream.
+ */
void DecompressionStream::seek(PositionProvider& position) {
- // clear state to force seek to read from the right position
+ size_t seekedPosition = position.current();
+ // Case 3.: the seeked position is the one that is currently buffered and
Review comment:
It seems that this is `1` at line 536. Shall we match the number by
changing this `Case 3.:` -> `Case 1:`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]