alamb commented on code in PR #6077:
URL: https://github.com/apache/arrow-datafusion/pull/6077#discussion_r1174403940
##########
datafusion/optimizer/src/simplify_expressions/simplify_exprs.rs:
##########
@@ -61,16 +63,14 @@ impl SimplifyExpressions {
plan: &LogicalPlan,
execution_props: &ExecutionProps,
) -> Result<LogicalPlan> {
- // Pass down the `children merge schema` and `plan schema` to evaluate
expression types.
- // pass all `child schema` and `plan schema` isn't enough, because
like `t1 semi join t2 on
- // on t1.id = t2.id`, each individual schema can't contain all the
columns in it.
- let children_merge_schema =
DFSchemaRef::new(merge_schema(plan.inputs()));
- let schemas = vec![plan.schema(), &children_merge_schema];
- let info = schemas
- .into_iter()
- .fold(SimplifyContext::new(execution_props), |context, schema| {
- context.with_schema(schema.clone())
- });
+ let schema = if plan.inputs().is_empty() {
+ // When predicates are pushed into a table scan, there needs to be
Review Comment:
Thank you
--
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]