@@ -83,10 +83,8 @@ impl From<DataFusionError> for ArrowError {
8383 fn from ( e : DataFusionError ) -> Self {
8484 match e {
8585 DataFusionError :: ArrowError ( e) => e,
86- DataFusionError :: External ( e) => {
87- ArrowError :: External ( "datafusion" . to_string ( ) , e)
88- }
89- other => ArrowError :: External ( "datafusion" . to_string ( ) , Box :: new ( other) ) ,
86+ DataFusionError :: External ( e) => ArrowError :: External ( "" . to_string ( ) , e) ,
87+ other => ArrowError :: External ( "" . to_string ( ) , Box :: new ( other) ) ,
9088 }
9189 }
9290}
@@ -162,7 +160,10 @@ mod test {
162160 #[ test]
163161 fn datafusion_error_to_arrow ( ) {
164162 let res = return_datafusion_error ( ) . unwrap_err ( ) ;
165- assert_eq ! ( res. to_string( ) , "Arrow error: Schema error: bar" ) ;
163+ assert_eq ! (
164+ res. to_string( ) ,
165+ "Arrow error: Invalid argument error: Schema error: bar"
166+ ) ;
166167 }
167168
168169 /// Model what happens when implementing SendableRecrordBatchStream:
@@ -179,7 +180,9 @@ mod test {
179180 #[ allow( clippy:: try_err) ]
180181 fn return_datafusion_error ( ) -> crate :: error:: Result < ( ) > {
181182 // Expect the '?' to work
182- let _bar = Err ( ArrowError :: OutOfSpec ( "bar" . to_string ( ) ) ) ?;
183+ let _bar = Err ( ArrowError :: InvalidArgumentError (
184+ "Schema error: bar" . to_string ( ) ,
185+ ) ) ?;
183186 Ok ( ( ) )
184187 }
185188}
0 commit comments