File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,8 @@ impl PySubstraitProducer {
114114 /// Convert DataFusion LogicalPlan to Substrait Plan
115115 #[ staticmethod]
116116 pub fn to_substrait_plan ( plan : PyLogicalPlan , ctx : & PySessionContext ) -> PyResult < PyPlan > {
117- match producer:: to_substrait_plan ( & plan. plan , & ctx. ctx ) {
117+ let session_state = ctx. ctx . state ( ) ;
118+ match producer:: to_substrait_plan ( & plan. plan , & session_state) {
118119 Ok ( plan) => Ok ( PyPlan { plan : * plan } ) ,
119120 Err ( e) => Err ( py_datafusion_err ( e) ) ,
120121 }
@@ -134,7 +135,8 @@ impl PySubstraitConsumer {
134135 plan : PyPlan ,
135136 py : Python ,
136137 ) -> PyResult < PyLogicalPlan > {
137- let result = consumer:: from_substrait_plan ( & ctx. ctx , & plan. plan ) ;
138+ let session_state = ctx. ctx . state ( ) ;
139+ let result = consumer:: from_substrait_plan ( & session_state, & plan. plan ) ;
138140 let logical_plan = wait_for_future ( py, result) . map_err ( DataFusionError :: from) ?;
139141 Ok ( PyLogicalPlan :: new ( logical_plan) )
140142 }
You can’t perform that action at this time.
0 commit comments