Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
XiangpengHao committed Jan 3, 2025
1 parent eae2850 commit b394ff9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions parquet/src/arrow/async_reader/arrow_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ impl FilteredParquetRecordBatchReader {
self.row_filter.take()
}

#[inline(never)]
/// Take a selection, and return the new selection where the rows are filtered by the predicate.
fn build_predicate_filter(
&mut self,
Expand Down Expand Up @@ -372,7 +371,6 @@ impl<R: ChunkReader> Iterator for CachedPageReader<R> {

impl<R: ChunkReader> PageReader for CachedPageReader<R> {
fn get_next_page(&mut self) -> Result<Option<Page>, ParquetError> {
// self.inner.get_next_page()
let next_page_offset = self.inner.peek_next_page_offset()?;

let Some(offset) = next_page_offset else {
Expand Down
2 changes: 1 addition & 1 deletion parquet/src/arrow/async_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ where
/// - `Ok(None)` if the stream has ended.
/// - `Err(error)` if the stream has errored. All subsequent calls will return `Ok(None)`.
/// - `Ok(Some(reader))` which holds all the data for the row group.
pub async fn next_row_group(&mut self) -> Result<Option<ParquetRecordBatchReader>> {
pub async fn next_row_group(&mut self) -> Result<Option<FilteredParquetRecordBatchReader>> {
loop {
match &mut self.state {
StreamState::Decoding(_) | StreamState::Reading(_) => {
Expand Down
3 changes: 3 additions & 0 deletions parquet/src/file/serialized_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ impl<R: ChunkReader> SerializedPageReader<R> {
})
}

/// Similar to `peek_next_page`, but returns the offset of the next page instead of the page metadata.
/// Unlike page metadata, an offset can uniquely identify a page.
/// Useful when we want to if the next page is being cached or read previously.
#[cfg(feature = "async")]
pub(crate) fn peek_next_page_offset(&mut self) -> Result<Option<usize>> {
match &mut self.state {
Expand Down

0 comments on commit b394ff9

Please sign in to comment.