-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Refactor benchmark imports to use util
module
#12885
Conversation
Updated various benchmarks to import `BenchmarkRun`, `CommonOpt`, and `AccessLogOpt` from the `util` module. This improvement organizes and consolidates imports for better maintainability and consistency across the project.
@@ -26,7 +26,7 @@ use datafusion::datasource::listing::{ | |||
use datafusion::datasource::MemTable; | |||
use datafusion::prelude::CsvReadOptions; | |||
use datafusion::{arrow::util::pretty, error::Result, prelude::SessionContext}; | |||
use datafusion_benchmarks::BenchmarkRun; | |||
use datafusion_benchmarks::util::BenchmarkRun; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the real problem (if any) is that datafusion_benchmarks::BenchmarkRun
and datafusion_benchmarks::util::BenchmarkRun
are both valid import path.
there are 3 ways to go about it
- stop re-exporting BenchmarkRun from crate root, require
::util::
- make util private, accept only BenchmarkRun import from crate root
- ignore the problem and give up on consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stop re-exporting BenchmarkRun from crate root, require ::util::
I think that is what this PR does which seems reasonable to me
@@ -21,5 +21,4 @@ pub mod imdb; | |||
pub mod parquet_filter; | |||
pub mod sort; | |||
pub mod tpch; | |||
mod util; | |||
pub use util::*; | |||
pub mod util; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like an improvment to me (not re-export everything from util
into the banchmark
crate namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
util
moduleutil
module
This pull request focuses on refactoring the import statements across multiple files in the
benchmarks
module to improve code organization by consolidating utility imports into a single module.Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
yes
Are there any user-facing changes?