Skip to content

Commit

Permalink
Refine ParquetAccessPlan comments and tests (#10896)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Jun 13, 2024
1 parent 1aa205d commit 1fc5f91
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ mod test {
let access_plan = ParquetAccessPlan::new(vec![
RowGroupAccess::Scan,
RowGroupAccess::Selection(
// select / skip all 20 rows in row group 1
// specifies all 20 rows in row group 1
vec![
RowSelector::select(5),
RowSelector::skip(7),
Expand Down Expand Up @@ -463,7 +463,7 @@ mod test {
fn test_invalid_too_few() {
let access_plan = ParquetAccessPlan::new(vec![
RowGroupAccess::Scan,
// select 12 rows, but row group 1 has 20
// specify only 12 rows in selection, but row group 1 has 20
RowGroupAccess::Selection(
vec![RowSelector::select(5), RowSelector::skip(7)].into(),
),
Expand All @@ -484,7 +484,7 @@ mod test {
fn test_invalid_too_many() {
let access_plan = ParquetAccessPlan::new(vec![
RowGroupAccess::Scan,
// select 22 rows, but row group 1 has only 20
// specify 22 rows in selection, but row group 1 has only 20
RowGroupAccess::Selection(
vec![
RowSelector::select(10),
Expand Down
5 changes: 2 additions & 3 deletions datafusion/core/src/datasource/physical_plan/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,8 @@ pub use writer::plan_to_parquet;
/// used to implement external indexes on top of parquet files and select only
/// portions of the files.
///
/// The `ParquetExec` will try and further reduce any provided
/// `ParquetAccessPlan` further based on the contents of `ParquetMetadata` and
/// other settings.
/// The `ParquetExec` will try and reduce any provided `ParquetAccessPlan`
/// further based on the contents of `ParquetMetadata` and other settings.
///
/// ## Example of providing a ParquetAccessPlan
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ fn create_initial_plan(

// check row group count matches the plan
return Ok(access_plan.clone());
} else {
debug!("ParquetExec Ignoring unknown extension specified for {file_name}");
}
}

Expand Down

0 comments on commit 1fc5f91

Please sign in to comment.