File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 17
17
18
18
use datafusion_common:: { internal_datafusion_err, DataFusionError } ;
19
19
20
+ /// Return a `DataFusionError::Internal` with the given message
20
21
pub fn proto_error < S : Into < String > > ( message : S ) -> DataFusionError {
21
22
internal_datafusion_err ! ( "{}" , message. into( ) )
22
23
}
Original file line number Diff line number Diff line change @@ -355,10 +355,7 @@ impl AsLogicalPlan for LogicalPlanNode {
355
355
. as_ref ( )
356
356
. map ( |expr| from_proto:: parse_expr ( expr, ctx, extension_codec) )
357
357
. transpose ( ) ?
358
- . ok_or_else ( || {
359
- DataFusionError :: Internal ( "expression required" . to_string ( ) )
360
- } ) ?;
361
- // .try_into()?;
358
+ . ok_or_else ( || proto_error ( "expression required" ) ) ?;
362
359
LogicalPlanBuilder :: from ( input) . filter ( expr) ?. build ( )
363
360
}
364
361
LogicalPlanType :: Window ( window) => {
@@ -464,7 +461,7 @@ impl AsLogicalPlan for LogicalPlanNode {
464
461
. map ( |col| {
465
462
let Some ( arrow_type) = col. arrow_type . as_ref ( ) else {
466
463
return Err ( proto_error (
467
- "Missing Arrow type in partition columns" . to_string ( ) ,
464
+ "Missing Arrow type in partition columns" ,
468
465
) ) ;
469
466
} ;
470
467
let arrow_type = DataType :: try_from ( arrow_type) . map_err ( |e| {
You can’t perform that action at this time.
0 commit comments