From 188456448c1dd0ab409d3df7e0182de21b055b94 Mon Sep 17 00:00:00 2001 From: wiedld Date: Tue, 24 Dec 2024 16:23:28 -0800 Subject: [PATCH] chore: handle option trailer to error message --- datafusion/optimizer/src/optimizer.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/datafusion/optimizer/src/optimizer.rs b/datafusion/optimizer/src/optimizer.rs index f319191574cb..eff8e11d855c 100644 --- a/datafusion/optimizer/src/optimizer.rs +++ b/datafusion/optimizer/src/optimizer.rs @@ -544,7 +544,7 @@ mod tests { schema: Arc::new(DFSchema::empty()), }); let err = opt.optimize(plan, &config, &observe).unwrap_err(); - assert_eq!( + assert!(err.strip_backtrace().starts_with( "Optimizer rule 'get table_scan rule' failed\n\ caused by\n\ Check optimizer-specific invariants after optimizer rule: get table_scan rule\n\ @@ -564,10 +564,8 @@ mod tests { ], \ metadata: {} }, \ field_qualifiers: [Some(Bare { table: \"test\" }), Some(Bare { table: \"test\" }), Some(Bare { table: \"test\" })], \ - functional_dependencies: FunctionalDependencies { deps: [] } }.\n\ - This 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() - ); + functional_dependencies: FunctionalDependencies { deps: [] } }.", + )); } #[test]