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

Speed up arrow_statistics test #10735

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Conversation

alamb
Copy link
Contributor

@alamb alamb commented May 31, 2024

Which issue does this PR close?

Part of #10453

Rationale for this change

Currently arrow_statistics take multiple seconds on my local machine (see screenshot)
Screenshot 2024-05-30 at 6 37 45 PM

This is because they make the same parquet file over and over again.

What changes are included in this PR?

Update the test to reuse the created parquet files

Are these changes tested?

They are all tests. Now they go 2x faster on my local machine:

Screenshot 2024-05-31 at 7 05 44 AM

Are there any user-facing changes?

No this is all tests

@github-actions github-actions bot added the core Core DataFusion crate label May 31, 2024
/// The parquet file reader
reader: ParquetRecordBatchReaderBuilder<File>,
reader: &'a ParquetRecordBatchReaderBuilder<File>,
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 change is to reuse the reader rather than recreating it each time

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Member

@jonahgao jonahgao left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍
These tests run faster on my machine, taking 6 seconds versus 15 seconds.

@comphead
Copy link
Contributor

comphead commented Jun 3, 2024

We got lots of statistics PRs so conflicts are unavoidable

@alamb
Copy link
Contributor Author

alamb commented Jun 3, 2024

We got lots of statistics PRs so conflicts are unavoidable

Thanks for the heads up @comphead -- I plan to get the other statistics tests in first and then I will merge / fixup this one

@alamb
Copy link
Contributor Author

alamb commented Jun 4, 2024

THe other statistics PRs have been merged and I resolved conflicts in this branch.

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @alamb

@comphead comphead merged commit 66ef9b9 into apache:main Jun 4, 2024
23 checks passed
@alamb alamb deleted the alamb/faster_parquet_tests branch June 4, 2024 15:12
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
* Speed up arrow_statistics test

* resolve logical conflicts
This pull request was closed.
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