This is an automated email from the ASF dual-hosted git repository.

agrove pushed a commit to branch comet-parquet-exec
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git

commit ef54934ea4a98728578f524fe68d182ca0856347
Author: Andy Grove <agr...@apache.org>
AuthorDate: Sat Nov 9 11:13:13 2024 -0700

    fix
---
 native/core/src/execution/datafusion/planner.rs | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/native/core/src/execution/datafusion/planner.rs 
b/native/core/src/execution/datafusion/planner.rs
index 285623a9..ff492fa2 100644
--- a/native/core/src/execution/datafusion/planner.rs
+++ b/native/core/src/execution/datafusion/planner.rs
@@ -999,17 +999,14 @@ impl PhysicalPlanner {
                     // Create a conjunctive form of the vector because 
ParquetExecBuilder takes
                     // a single expression
                     let data_filters = data_filters?;
-                    let test_data_filters = data_filters
-                        .clone()
-                        .into_iter()
-                        .reduce(|left, right| {
+                    let test_data_filters =
+                        data_filters.clone().into_iter().reduce(|left, right| {
                             Arc::new(BinaryExpr::new(
                                 left,
                                 datafusion::logical_expr::Operator::And,
                                 right,
                             ))
-                        })
-                        .unwrap();
+                        });
 
                     println!("data_filters: {:?}", data_filters);
                     println!("test_data_filters: {:?}", test_data_filters);
@@ -1050,9 +1047,13 @@ impl PhysicalPlanner {
                     table_parquet_options.global.pushdown_filters = true;
                     table_parquet_options.global.reorder_filters = true;
 
-                    let builder = ParquetExecBuilder::new(file_scan_config)
-                        .with_predicate(test_data_filters)
+                    let mut builder = ParquetExecBuilder::new(file_scan_config)
                         .with_table_parquet_options(table_parquet_options);
+
+                    if let Some(filter) = test_data_filters {
+                        builder = builder.with_predicate(filter);
+                    }
+
                     let scan = builder.build();
                     return Ok((vec![], Arc::new(scan)));
                 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org
For additional commands, e-mail: commits-h...@datafusion.apache.org

Reply via email to