Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions datafusion/datasource-parquet/src/file_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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<usize>,
decryption_properties: Option<&FileDecryptionProperties>,
file_metadata_cache: Option<Arc<FileMetadataCache>>,
) -> Result<Arc<ParquetMetaData>> {
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<usize>,
decryption_properties: Option<&FileDecryptionProperties>,
file_metadata_cache: Option<Arc<FileMetadataCache>>,
) -> Result<Statistics> {
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<Statistics> {
DFParquetMetadata::statistics_from_parquet_metadata(metadata, &table_schema)
}

#[cfg(feature = "proto")]
use datafusion_proto_models::protobuf::{self, parquet_column_options, parquet_options};

Expand Down
17 changes: 0 additions & 17 deletions datafusion/datasource-parquet/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<dyn PhysicalExpr>> {
self.predicate.as_ref()
}

/// return the optional file reader factory
pub fn parquet_file_reader_factory(
&self,
Expand Down Expand Up @@ -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;
Expand Down