Skip to content

Commit

Permalink
new_with_options
Browse files Browse the repository at this point in the history
  • Loading branch information
rok committed Feb 5, 2025
1 parent 925d86f commit ac4ac21
Showing 1 changed file with 32 additions and 12 deletions.
44 changes: 32 additions & 12 deletions parquet/src/arrow/async_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1278,9 +1278,14 @@ mod tests {
};

let options = ArrowReaderOptions::new().with_page_index(true);
let builder = ParquetRecordBatchStreamBuilder::new_with_options(async_reader, options)
.await
.unwrap();
let builder = ParquetRecordBatchStreamBuilder::new_with_options(
async_reader,
options,
#[cfg(feature = "encryption")]
None,
)
.await
.unwrap();

// The builder should have page and offset indexes loaded now
let metadata_with_index = builder.metadata();
Expand Down Expand Up @@ -1392,9 +1397,14 @@ mod tests {
};

let options = ArrowReaderOptions::new().with_page_index(true);
let builder = ParquetRecordBatchStreamBuilder::new_with_options(async_reader, options)
.await
.unwrap();
let builder = ParquetRecordBatchStreamBuilder::new_with_options(
async_reader,
options,
#[cfg(feature = "encryption")]
None,
)
.await
.unwrap();

let selection = RowSelection::from(vec![
RowSelector::skip(21), // Skip first page
Expand Down Expand Up @@ -1475,9 +1485,14 @@ mod tests {
};

let options = ArrowReaderOptions::new().with_page_index(true);
let builder = ParquetRecordBatchStreamBuilder::new_with_options(async_reader, options)
.await
.unwrap();
let builder = ParquetRecordBatchStreamBuilder::new_with_options(
async_reader,
options,
#[cfg(feature = "encryption")]
None,
)
.await
.unwrap();

let col_idx: usize = rand.gen_range(0..13);
let mask = ProjectionMask::leaves(builder.parquet_schema(), vec![col_idx]);
Expand Down Expand Up @@ -1546,9 +1561,14 @@ mod tests {
};

let options = ArrowReaderOptions::new().with_page_index(true);
let builder = ParquetRecordBatchStreamBuilder::new_with_options(async_reader, options)
.await
.unwrap();
let builder = ParquetRecordBatchStreamBuilder::new_with_options(
async_reader,
options,
#[cfg(feature = "encryption")]
None,
)
.await
.unwrap();

let col_idx: usize = rand.gen_range(0..13);
let mask = ProjectionMask::leaves(builder.parquet_schema(), vec![col_idx]);
Expand Down

0 comments on commit ac4ac21

Please sign in to comment.