File tree Expand file tree Collapse file tree
datafusion/datasource-parquet/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -375,7 +375,10 @@ pub(crate) fn can_expr_be_pushed_down_with_schemas(
375375 expr : & Arc < dyn PhysicalExpr > ,
376376 file_schema : & Schema ,
377377) -> bool {
378- pushdown_columns ( expr, file_schema) . is_ok ( )
378+ match pushdown_columns ( expr, file_schema) {
379+ Ok ( Some ( _) ) => true ,
380+ Ok ( None ) | Err ( _) => false ,
381+ }
379382}
380383
381384/// Calculate the total compressed size of all `Column`'s required for
Original file line number Diff line number Diff line change @@ -91,10 +91,7 @@ use object_store::ObjectStore;
9191/// # let file_schema = Arc::new(Schema::empty());
9292/// # let object_store_url = ObjectStoreUrl::local_filesystem();
9393/// # let predicate = lit(true);
94- /// let source = Arc::new(
95- /// ParquetSource::default()
96- /// .with_predicate(Arc::clone(&file_schema), predicate)
97- /// );
94+ /// let source = Arc::new(ParquetSource::default().with_predicate(predicate));
9895/// // Create a DataSourceExec for reading `file1.parquet` with a file size of 100MB
9996/// let config = FileScanConfigBuilder::new(object_store_url, file_schema, source)
10097/// .with_file(PartitionedFile::new("file1.parquet", 100*1024*1024)).build();
You can’t perform that action at this time.
0 commit comments