jackwener opened a new issue, #6613:
URL: https://github.com/apache/arrow-datafusion/issues/6613
### Describe the bug
#5821 is caused by this problem.
In original code, project call `from_plan`, it will keep original schema
even if expression are different.
It's wrong! Because different expression will have different schema.
code is wrong
```rust
LogicalPlan::Projection(Projection { schema, .. }) => {
Ok(LogicalPlan::Projection(Projection::try_new_with_schema(
expr.to_vec(),
Arc::new(inputs[0].clone()),
schema. Clone(),
)?))
}
```
should be
```rust
LogicalPlan::Projection(_) =>
Ok(LogicalPlan::Projection(Projection::try_new(
expr.to_vec(),
Arc::new(inputs[0].clone()),
)?)),
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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]