Ted-Jiang commented on code in PR #2460:
URL: https://github.com/apache/arrow-rs/pull/2460#discussion_r946310285
##########
parquet/src/file/serialized_reader.rs:
##########
@@ -667,12 +742,32 @@ impl<T: Read + Send> PageReader for
SerializedPageReader<T> {
fn skip_next_page(&mut self) -> Result<()> {
match &mut self.buf {
- SerializedPages::Chunk { .. } => { Err(general_err!("Must set
page_offset_index when using skip_next_page in SerializedPageReader.")) }
- SerializedPages::Pages { offset_index, seen_num_data_pages, .. }
=> {
+ SerializedPages::Chunk {
+ next_page_header,
+ buf,
+ } => {
+ if let Some(header) = next_page_header.take() {
+ let to_skip = header.compressed_page_size;
+ let mut buffer = Vec::with_capacity(to_skip as usize);
+ buf.read_exact(&mut buffer)?;
Review Comment:
@tustvold need you help 😂. for now `T: Read` should we implement `T: Read +
Seek`, is there some magic way🤔
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]