alamb commented on code in PR #11479:
URL: https://github.com/apache/datafusion/pull/11479#discussion_r1695027284
##########
datafusion-examples/examples/parquet_index.rs:
##########
@@ -25,12 +25,10 @@ use arrow_schema::SchemaRef;
use async_trait::async_trait;
use datafusion::catalog::Session;
use datafusion::datasource::listing::PartitionedFile;
-use datafusion::datasource::physical_plan::{
- parquet::StatisticsConverter,
- {FileScanConfig, ParquetExec},
-};
+use datafusion::datasource::physical_plan::{FileScanConfig, ParquetExec};
use datafusion::datasource::TableProvider;
use datafusion::execution::object_store::ObjectStoreUrl;
+use datafusion::parquet::arrow::arrow_reader::statistics::StatisticsConverter;
Review Comment:
code has been ported to arrow-rs (🙏 @efredine )
##########
datafusion/core/src/datasource/physical_plan/parquet/row_group_filter.rs:
##########
@@ -356,20 +356,24 @@ impl<'a> RowGroupPruningStatistics<'a> {
&'a self,
column: &'b Column,
) -> Result<StatisticsConverter<'a>> {
- StatisticsConverter::try_new(&column.name, self.arrow_schema,
self.parquet_schema)
+ Ok(StatisticsConverter::try_new(
+ &column.name,
+ self.arrow_schema,
+ self.parquet_schema,
+ )?)
}
}
impl<'a> PruningStatistics for RowGroupPruningStatistics<'a> {
fn min_values(&self, column: &Column) -> Option<ArrayRef> {
self.statistics_converter(column)
- .and_then(|c| c.row_group_mins(self.metadata_iter()))
+ .and_then(|c| Ok(c.row_group_mins(self.metadata_iter())?))
Review Comment:
this is necessary to convert from `ArrowError` to `DataFusionError`
##########
datafusion/core/benches/parquet_statistic.rs:
##########
@@ -1,287 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
Review Comment:
moved to arrow
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]