Skip to content

Commit

Permalink
test: apache#9010 flip expected order of schema change errors
Browse files Browse the repository at this point in the history
  • Loading branch information
curtisleefulton committed Jan 26, 2024
1 parent f5ceeb1 commit bea1f4d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions datafusion/optimizer/src/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,14 @@ mod tests {
let err = opt.optimize(&plan, &config, &observe).unwrap_err();
assert_eq!(
"Optimizer rule 'get table_scan rule' failed\ncaused by\nget table_scan rule\ncaused by\n\
Internal error: Failed due to a difference in schemas, \
original schema: DFSchema { fields: [], metadata: {}, functional_dependencies: FunctionalDependencies { deps: [] } }, \
new schema: DFSchema { fields: [\
DFField { qualifier: Some(Bare { table: \"test\" }), field: Field { name: \"a\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} } }, \
DFField { qualifier: Some(Bare { table: \"test\" }), field: Field { name: \"b\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} } }, \
DFField { qualifier: Some(Bare { table: \"test\" }), field: Field { name: \"c\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} } }], \
metadata: {}, functional_dependencies: FunctionalDependencies { deps: [] } }.\
\nThis was likely caused by a bug in DataFusion's code \
and we would welcome that you file an bug report in our issue tracker",
Internal error: Failed due to a difference in schemas, \
original schema: DFSchema { fields: [\
DFField { qualifier: Some(Bare { table: \"test\" }), field: Field { name: \"a\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} } }, \
DFField { qualifier: Some(Bare { table: \"test\" }), field: Field { name: \"b\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} } }, \
DFField { qualifier: Some(Bare { table: \"test\" }), field: Field { name: \"c\", data_type: UInt32, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} } }], \
metadata: {}, functional_dependencies: FunctionalDependencies { deps: [] } }, \
new schema: DFSchema { fields: [], metadata: {}, functional_dependencies: FunctionalDependencies { deps: [] } }.\
\nThis was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker",
err.strip_backtrace()
);
}
Expand Down

0 comments on commit bea1f4d

Please sign in to comment.