@@ -83,10 +83,8 @@ impl From<DataFusionError> for ArrowError {
83
83
fn from ( e : DataFusionError ) -> Self {
84
84
match e {
85
85
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) ) ,
90
88
}
91
89
}
92
90
}
@@ -162,7 +160,10 @@ mod test {
162
160
#[ test]
163
161
fn datafusion_error_to_arrow ( ) {
164
162
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
+ ) ;
166
167
}
167
168
168
169
/// Model what happens when implementing SendableRecrordBatchStream:
@@ -179,7 +180,9 @@ mod test {
179
180
#[ allow( clippy:: try_err) ]
180
181
fn return_datafusion_error ( ) -> crate :: error:: Result < ( ) > {
181
182
// 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
+ ) ) ?;
183
186
Ok ( ( ) )
184
187
}
185
188
}
0 commit comments