refactor: Only pass along the one relevant config field
parent
03940d0750
commit
2c70cd0cd0
|
|
@ -109,8 +109,13 @@ pub async fn run(config: Config) -> Result<()> {
|
|||
let spec_in_root = root_dir.join(&spec_location);
|
||||
|
||||
for file_id in 0..config.num_files.get() {
|
||||
write_data_generation_spec(file_id, Arc::clone(&object_store), &config, &spec_location)
|
||||
.await?;
|
||||
write_data_generation_spec(
|
||||
file_id,
|
||||
Arc::clone(&object_store),
|
||||
config.num_columns.get(),
|
||||
&spec_location,
|
||||
)
|
||||
.await?;
|
||||
generate_data(&spec_in_root, &lp_dir)?;
|
||||
}
|
||||
|
||||
|
|
@ -152,13 +157,13 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
|
|||
async fn write_data_generation_spec(
|
||||
file_id: usize,
|
||||
object_store: Arc<DynObjectStore>,
|
||||
config: &Config,
|
||||
num_columns: usize,
|
||||
spec_location: &str,
|
||||
) -> Result<()> {
|
||||
let object_store_spec_path =
|
||||
object_store::path::Path::parse(spec_location).context(ObjectStorePathParsingSnafu)?;
|
||||
|
||||
let contents = data_generation_spec_contents(file_id, 1, config.num_columns.get());
|
||||
let contents = data_generation_spec_contents(file_id, 1, num_columns);
|
||||
let data = Bytes::from(contents);
|
||||
|
||||
object_store
|
||||
|
|
|
|||
Loading…
Reference in New Issue