diff --git a/datafusion/datasource-parquet/src/file_format.rs b/datafusion/datasource-parquet/src/file_format.rs index 18f2b5a650c8..26021aa708e2 100644 --- a/datafusion/datasource-parquet/src/file_format.rs +++ b/datafusion/datasource-parquet/src/file_format.rs @@ -67,14 +67,12 @@ use crate::source::{ use async_trait::async_trait; use bytes::Bytes; use datafusion_datasource::source::DataSourceExec; -use datafusion_execution::cache::cache_manager::FileMetadataCache; use futures::future::BoxFuture; use futures::{FutureExt, StreamExt, TryStreamExt}; use object_store::path::Path; use object_store::{ObjectMeta, ObjectStore, ObjectStoreExt}; use parquet::arrow::async_reader::MetadataFetch; use parquet::errors::ParquetError; -use parquet::file::metadata::ParquetMetaData; #[derive(Default)] /// Factory struct used to create [ParquetFormat] @@ -639,68 +637,6 @@ impl MetadataFetch for ObjectStoreFetch<'_> { } } -/// Fetches parquet metadata from ObjectStore for given object -/// -/// This component is a subject to **change** in near future and is exposed for low level integrations -/// through [`ParquetFileReaderFactory`]. -/// -/// [`ParquetFileReaderFactory`]: crate::ParquetFileReaderFactory -#[deprecated( - since = "50.0.0", - note = "Use `DFParquetMetadata::fetch_metadata` instead" -)] -pub async fn fetch_parquet_metadata( - store: &dyn ObjectStore, - object_meta: &ObjectMeta, - size_hint: Option, - decryption_properties: Option<&FileDecryptionProperties>, - file_metadata_cache: Option>, -) -> Result> { - let decryption_properties = decryption_properties.cloned().map(Arc::new); - DFParquetMetadata::new(store, object_meta) - .with_metadata_size_hint(size_hint) - .with_decryption_properties(decryption_properties) - .with_file_metadata_cache(file_metadata_cache) - .fetch_metadata() - .await -} - -/// Read and parse the statistics of the Parquet file at location `path` -/// -/// See [`statistics_from_parquet_meta_calc`] for more details -#[deprecated( - since = "50.0.0", - note = "Use `DFParquetMetadata::fetch_statistics` instead" -)] -pub async fn fetch_statistics( - store: &dyn ObjectStore, - table_schema: SchemaRef, - file: &ObjectMeta, - metadata_size_hint: Option, - decryption_properties: Option<&FileDecryptionProperties>, - file_metadata_cache: Option>, -) -> Result { - let decryption_properties = decryption_properties.cloned().map(Arc::new); - DFParquetMetadata::new(store, file) - .with_metadata_size_hint(metadata_size_hint) - .with_decryption_properties(decryption_properties) - .with_file_metadata_cache(file_metadata_cache) - .fetch_statistics(&table_schema) - .await -} - -#[deprecated( - since = "50.0.0", - note = "Use `DFParquetMetadata::statistics_from_parquet_metadata` instead" -)] -#[expect(clippy::needless_pass_by_value)] -pub fn statistics_from_parquet_meta_calc( - metadata: &ParquetMetaData, - table_schema: SchemaRef, -) -> Result { - DFParquetMetadata::statistics_from_parquet_metadata(metadata, &table_schema) -} - #[cfg(feature = "proto")] use datafusion_proto_models::protobuf::{self, parquet_column_options, parquet_options}; diff --git a/datafusion/datasource-parquet/src/source.rs b/datafusion/datasource-parquet/src/source.rs index 4872db9fd332..24e23f34119a 100644 --- a/datafusion/datasource-parquet/src/source.rs +++ b/datafusion/datasource-parquet/src/source.rs @@ -394,12 +394,6 @@ impl ParquetSource { &self.table_parquet_options } - /// Optional predicate. - #[deprecated(since = "50.2.0", note = "use `filter` instead")] - pub fn predicate(&self) -> Option<&Arc> { - self.predicate.as_ref() - } - /// return the optional file reader factory pub fn parquet_file_reader_factory( &self, @@ -1299,17 +1293,6 @@ mod tests { use arrow::datatypes::Schema; use datafusion_physical_expr::expressions::lit; - #[test] - #[expect(deprecated)] - fn test_parquet_source_predicate_same_as_filter() { - let predicate = lit(true); - - let parquet_source = - ParquetSource::new(Arc::new(Schema::empty())).with_predicate(predicate); - // same value. but filter() call Arc::clone internally - assert_eq!(parquet_source.predicate(), parquet_source.filter().as_ref()); - } - #[test] fn test_reverse_scan_default_value() { use arrow::datatypes::Schema;