Skip to content

Commit cd57f3e

Browse files
committed
remove RuntimeEnv from few function arguments
1 parent 35165e5 commit cd57f3e

File tree

4 files changed

+145
-224
lines changed

4 files changed

+145
-224
lines changed

datafusion-examples/examples/composed_extension_codec.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
3333
use std::any::Any;
3434
use std::fmt::Debug;
35-
use std::ops::Deref;
3635
use std::sync::Arc;
3736

3837
use datafusion::common::internal_err;
@@ -71,9 +70,8 @@ async fn main() {
7170
.expect("to proto");
7271

7372
// deserialize proto back to execution plan
74-
let runtime = ctx.runtime_env();
7573
let result_exec_plan: Arc<dyn ExecutionPlan> = proto
76-
.try_into_physical_plan(&ctx.task_ctx(), runtime.deref(), &composed_codec)
74+
.try_into_physical_plan(&ctx.task_ctx(), &composed_codec)
7775
.expect("from proto");
7876

7977
// assert that the original and deserialized execution plans are equal

datafusion/proto/src/bytes/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ pub fn physical_plan_from_json(
309309
let back: protobuf::PhysicalPlanNode = serde_json::from_str(json)
310310
.map_err(|e| plan_datafusion_err!("Error serializing plan: {e}"))?;
311311
let extension_codec = DefaultPhysicalExtensionCodec {};
312-
back.try_into_physical_plan(&ctx.task_ctx(), &ctx.runtime_env(), &extension_codec)
312+
back.try_into_physical_plan(&ctx.task_ctx(), &extension_codec)
313313
}
314314

315315
/// Deserialize a PhysicalPlan from bytes
@@ -329,5 +329,5 @@ pub fn physical_plan_from_bytes_with_extension_codec(
329329
) -> Result<Arc<dyn ExecutionPlan>> {
330330
let protobuf = protobuf::PhysicalPlanNode::decode(bytes)
331331
.map_err(|e| plan_datafusion_err!("Error decoding expr as protobuf: {e}"))?;
332-
protobuf.try_into_physical_plan(ctx, &ctx.runtime_env(), extension_codec)
332+
protobuf.try_into_physical_plan(ctx, extension_codec)
333333
}

0 commit comments

Comments
 (0)