Apache DataFusion SQL Query Engine
Minor: used named constant for the schema inference concurrency limit (#6389)
Andrew Lambdd5e1dbbfd20
diff --git a/datafusion/core/src/datasource/file_format/parquet.rs b/datafusion/core/src/datasource/file_format/parquet.rsindex c2bccb6378..767a6a22a4 100644--- a/datafusion/core/src/datasource/file_format/parquet.rs+++ b/datafusion/core/src/datasource/file_format/parquet.rs@@ -52,6 +52,9 @@ use crate::physical_plan::{Accumulator, ExecutionPlan, Statistics};/// The default file extension of parquet filespub const DEFAULT_PARQUET_EXTENSION: &str = ".parquet";+/// The number of files to read in parallel when inferring schema+const SCHEMA_INFERENCE_CONCURRENCY: usize = 32;+/// The Apache Parquet `FileFormat` implementation////// Note it is recommended these are instead configured on the [`ConfigOptions`]@@ -155,7 +158,7 @@ impl FileFormat for ParquetFormat {let schemas: Vec<_> = futures::stream::iter(objects).map(|object| fetch_schema(store.as_ref(), object, self.metadata_size_hint)).boxed() // Workaround https://github.com/rust-lang/rust/issues/64552- .buffered(32)+ .buffered(SCHEMA_INFERENCE_CONCURRENCY).try_collect().await?;