Wes McKinney created ARROW-3870: ----------------------------------- Summary: [C++] Add Peek to InputStream API Key: ARROW-3870 URL: https://issues.apache.org/jira/browse/ARROW-3870 Project: Apache Arrow Issue Type: Improvement Components: C++ Reporter: Wes McKinney Fix For: 0.12.0
Some InputStream sources support lookahead without advancing the stream, like BufferReader and BufferedInputStream. This is used in Parquet's internal IO APIs, so it would be useful to be able to remove these after a deprecation cycle https://github.com/apache/arrow/blob/master/cpp/src/parquet/util/memory.h#L375 If an InputStream does not support Peek, the returned {{string_view}} would have zero size. Another option is to have {{Peek}} return {{Status}}, so that NotImplemented can be returned. I would prefer to return 0-length if the operation is not supported -- This message was sent by Atlassian JIRA (v7.6.3#76005)