File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ impl PyDataFrame {
663663
664664 fn distributed_plan ( & self , num_shards : usize , py : Python < ' _ > ) -> PyResult < DistributedPlan > {
665665 let distributed_plan = wait_for_future ( py, split_physical_plan ( & self . df , num_shards) )
666- . map_err ( PyErr :: from ) ?;
666+ . map_err ( py_datafusion_err ) ?;
667667 Ok ( distributed_plan)
668668 }
669669
@@ -802,11 +802,11 @@ pub fn shard_stream(serialized_shard_plan: &[u8]) -> PyResult<PyRecordBatchStrea
802802 let codec = DeltaPhysicalCodec { } ;
803803 let node = PhysicalPlanNode :: decode ( serialized_shard_plan)
804804 . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) )
805- . map_err ( PyErr :: from ) ?;
805+ . map_err ( py_datafusion_err ) ?;
806806 let plan = node. try_into_physical_plan ( & registry, & runtime, & codec) ?;
807807 println ! ( "Shard plan: {}" , displayable( plan. as_ref( ) ) . one_line( ) ) ;
808808 let ctx = TaskContext :: default ( ) ;
809- execute_stream ( plan, Arc :: new ( ctx) ) . map ( PyRecordBatchStream :: new) . map_err ( PyErr :: from )
809+ execute_stream ( plan, Arc :: new ( ctx) ) . map ( PyRecordBatchStream :: new) . map_err ( py_datafusion_err )
810810}
811811
812812/// Print DataFrame
You can’t perform that action at this time.
0 commit comments