jamxia155 commented on code in PR #14194: URL: https://github.com/apache/datafusion/pull/14194#discussion_r1976451999
########## datafusion/substrait/src/logical_plan/consumer.rs: ########## @@ -1327,19 +1327,37 @@ pub async fn from_read_rel( table_ref: TableReference, schema: DFSchema, projection: &Option<MaskExpression>, + filter: &Option<Box<Expression>>, + best_effort_filter: &Option<Box<Expression>>, ) -> Result<LogicalPlan> { let schema = schema.replace_qualifier(table_ref.clone()); + let filters = if let Some(f) = filter { + let filter_expr = consumer.consume_expression(&(f.clone()), &schema).await?; + split_conjunction_owned(filter_expr) + } else { + vec![] + }; + + let best_effort_filters = if let Some(bef) = best_effort_filter { + let best_effort_filter_expr = + consumer.consume_expression(&(bef.clone()), &schema).await?; + split_conjunction_owned(best_effort_filter_expr) + } else { + vec![] + }; + let plan = { let provider = match consumer.resolve_table_ref(&table_ref).await? { Some(ref provider) => Arc::clone(provider), _ => return plan_err!("No table named '{table_ref}'"), }; - LogicalPlanBuilder::scan( + LogicalPlanBuilder::scan_with_filters( table_ref, provider_as_source(Arc::clone(&provider)), None, + [filters, best_effort_filters].concat(), Review Comment: Updated to not use the `best_effort_filter` field. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org