You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/25 15:20:36 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #2155: Implement `peek_next_page` and `skip_next_page` for `InMemoryColumnCh…

tustvold commented on code in PR #2155:
URL: https://github.com/apache/arrow-rs/pull/2155#discussion_r929007257


##########
parquet/src/arrow/async_reader.rs:
##########
@@ -589,11 +599,87 @@ impl PageReader for InMemoryColumnChunkReader {
     }
 
     fn peek_next_page(&mut self) -> Result<Option<PageMetadata>> {
-        Err(nyi_err!("https://github.com/apache/arrow-rs/issues/1792"))
+        while self.seen_num_values < self.chunk.num_values {
+            return if let Some(buffered_header) = self.next_page_header.as_ref() {
+                match buffered_header.type_ {

Review Comment:
   Perhaps we could extract this conversion into a From implementation? This would reduce code duplication in this function and potentially elsewhere



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org