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

Consolidate ParquetExec tests in parquet_exec integration test #4130

Merged
merged 3 commits into from
Nov 8, 2022

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Nov 7, 2022

Which issue does this PR close?

re #3463

Rationale for this change

The parquet reader is both important and well tested in DataFusion. However, currently the tests are split in several places so it may not be all that clear what is covered.

Also, the parquet integration test currently takes 24 seconds so more parallelism would be better

$ cargo test --test parquet_filter_pushdown
...
running 1 test
test single_file ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 24.47s

What changes are included in this PR?

Changes:
Move most ParquetExec tests into the parquet_exec integration test:

drwxr-xr-x   4 alamb  staff    128 Nov  2 17:36 parquet
-rw-r--r--   1 alamb  staff  14682 Nov  5 07:05 parquet_filter_pushdown.rs
-rw-r--r--   1 alamb  staff   7518 Nov  3 12:35 parquet_page_index_pruning.rs
-rw-r--r--   1 alamb  staff  26958 Nov  5 07:05 parquet_pruning.rs

So now we can run the parquet tests like:

cargo test  --test parquet_exec

Are there any user-facing changes?

No

@alamb alamb requested a review from Ted-Jiang November 7, 2022 15:02
@github-actions github-actions bot added the core Core DataFusion crate label Nov 7, 2022
@@ -900,6 +900,8 @@ pub async fn plan_to_parquet(

#[cfg(test)]
mod tests {
// See also `parquet_exec` integration test

use super::*;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Ted-Jiang / @tustvold / @thinkharderdev what do you think about moving the remaining tests in this module into the integration test?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think some of them may make use of crate private functions, otherwise I have no strong feeling either way

Copy link
Contributor Author

@alamb alamb Nov 7, 2022

Choose a reason for hiding this comment

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

👍 yes I think the pruning ones in particular do so -- I would likely need to refactor somehow

Copy link
Contributor

Choose a reason for hiding this comment

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

No objection from me. I think we can probably leave the pruning tests as unit tests here and just move the more "integration-y" tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the only real reason to consolidate them is that my sense of order is somewhat violated that the three kinds of parquet predicate pushdown are not in the same pattern

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I will pursue the idea as a small follow on refactor

// under the License.

/// Run all tests that are found in the `parquet` directory
mod parquet;
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 idea is that this has become a single integration test that runs rather than three independent ones (that each need to be compiled / linked / run serially)

Copy link
Member

Choose a reason for hiding this comment

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

Sounds reasonable ! 👍

// under the License.

/// Run all tests that are found in the `parquet` directory
mod parquet;
Copy link
Member

Choose a reason for hiding this comment

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

Sounds reasonable ! 👍

@@ -900,6 +900,8 @@ pub async fn plan_to_parquet(

#[cfg(test)]
mod tests {
// See also `parquet_exec` integration test

use super::*;
Copy link
Contributor

Choose a reason for hiding this comment

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

No objection from me. I think we can probably leave the pruning tests as unit tests here and just move the more "integration-y" tests?

@ursabot
Copy link

ursabot commented Nov 8, 2022

Benchmark runs are scheduled for baseline = 175adbd and contender = ebc279c. ebc279c 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

@alamb alamb deleted the alamb/consolidate_parquet_tests 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.

5 participants