Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor: Split parquet reader up into smaller modules #4099

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Nov 3, 2022

Which issue does this PR close?

re #3462

Rationale for this change

There is a lot more parquet reading code now after @Ted-Jiang 's great work to add filter pushdown in #3780 and #3967

Let's move it into smaller modules so it is easier to work with

What changes are included in this PR?

  1. move physical_plan/file_format/row_filter.rs to physical_plan/file_format/parquet/row_filter.rs to make it clear this is part of the parquet format implementation
  2. Extract the page level statistics pruning into datafusion/core/src/physical_plan/file_format/parquet/page_filter.rs
  3. Extract metrics into datafusion/core/src/physical_plan/file_format/parquet/metrics.rs

Are there any user-facing changes?

No

There should be no functional change (none is intended)

builder = builder.with_row_selection(final_selection.into());
}
}
// page index pruning: if all data on individual pages can
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The core change of this PR is to refactor build_page_filter into a function and move its code into the page_filter module

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


use super::metrics::ParquetFileMetrics;

/// Create a RowSelection that may rule out ranges of rows based on
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I polished up some of the existing doc comments to try and explain what this module is doing

@@ -2193,65 +1765,6 @@ mod tests {
ParquetFileMetrics::new(0, "file.parquet", &metrics)
}

#[test]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to page_filter module

@alamb alamb requested a review from Ted-Jiang November 3, 2022 16:26
@github-actions github-actions bot added the core Core DataFusion crate label Nov 3, 2022
@alamb alamb changed the title minor: Encapsulate the parquet code a little more minor: Split parquet reader up into smaller modules Nov 3, 2022
@alamb alamb marked this pull request as draft November 3, 2022 19:49
@alamb
Copy link
Contributor Author

alamb commented Nov 3, 2022

This needs #4101 to pass Ci so marking as draft until then

@alamb alamb force-pushed the alamb/consolidate_parquet_code branch from 0d1abb7 to e920171 Compare November 3, 2022 20:17
@alamb alamb marked this pull request as ready for review November 3, 2022 20:17
builder = builder.with_row_selection(final_selection.into());
}
}
// page index pruning: if all data on individual pages can
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Ted-Jiang
Copy link
Member

Looks more readable! Thanks @alamb 👍

@Ted-Jiang Ted-Jiang merged commit f61b43a into apache:master Nov 4, 2022
@ursabot
Copy link

ursabot commented Nov 4, 2022

Benchmark runs are scheduled for baseline = fc03001 and contender = f61b43a. f61b43a is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Dandandan pushed a commit to yuuch/arrow-datafusion that referenced this pull request Nov 5, 2022
@alamb alamb deleted the alamb/consolidate_parquet_code branch August 8, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants