alamb commented on code in PR #4347:
URL: https://github.com/apache/arrow-datafusion/pull/4347#discussion_r1030862475
##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -351,6 +352,49 @@ mod tests {
Ok(())
}
+ #[test]
+ fn generate_same_schema_different_metadata() {
+ // if the plan creates more metadata than previously (because
+ // some wrapping functions are removed, etc) do not error
+ let opt = Optimizer::with_rules(vec![Arc::new(GetTableScanRule {})]);
Review Comment:
this test mimics what I was seeing in IOx
##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -225,7 +225,7 @@ impl Optimizer {
let result = rule.try_optimize(&new_plan, optimizer_config);
match result {
Ok(Some(plan)) => {
- if plan.schema() != new_plan.schema() {
+ if
!plan.schema().equivalent_names_and_types(new_plan.schema()) {
Review Comment:
This is the change
--
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]