Skip to content

Commit 8703496

Browse files
committed
update upgrading guide
1 parent caf9f89 commit 8703496

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

docs/source/library-user-guide/upgrading.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,50 @@
2323

2424
**Note:** DataFusion `51.0.0` has not been released yet. The information provided in this section pertains to features and changes that have already been merged to the main branch and are awaiting release in this version.
2525

26-
You can see the current [status of the `51.0.0 `release here](https://github.com/apache/datafusion/issues/17558)
26+
You can see the current [status of the `51.0.0`release here](https://github.com/apache/datafusion/issues/17558)
2727

2828
### `MSRV` updated to 1.87.0
2929

3030
The Minimum Supported Rust Version (MSRV) has been updated to [`1.87.0`].
3131

3232
[`1.87.0`]: https://releases.rs/docs/1.87.0/
3333

34+
### `datafusion-proto` use `TaskContext` rather than `SessionContext` in physical plan serde methods
35+
36+
There have been changes in the public API methods of `datafusion-proto` which handle physical plan serde.
37+
38+
Methods like `physical_plan_from_bytes`, `parse_physical_expr` and similar, expect `TaskContext` instead of `SessionContext`
39+
40+
```diff
41+
- let plan2 = physical_plan_from_bytes(&bytes, &ctx)?;
42+
+ let plan2 = physical_plan_from_bytes(&bytes, &ctx.task_ctx())?;
43+
```
44+
45+
as `TaskContext` contains `RuntimeEnv` methods such as `try_into_physical_plan` will not have explicit `RuntimeEnv` parameter.
46+
47+
```diff
48+
let result_exec_plan: Arc<dyn ExecutionPlan> = proto
49+
- .try_into_physical_plan(&ctx, runtime.deref(), &composed_codec)
50+
+. .try_into_physical_plan(&ctx.task_ctx(), &composed_codec)
51+
```
52+
53+
`PhysicalExtensionCodec::try_decode()` expects `TaskContext` instead of `FunctionRegistry`:
54+
55+
```diff
56+
pub trait PhysicalExtensionCodec {
57+
fn try_decode(
58+
&self,
59+
buf: &[u8],
60+
inputs: &[Arc<dyn ExecutionPlan>],
61+
- registry: &dyn FunctionRegistry,
62+
+ ctx: &TaskContext,
63+
) -> Result<Arc<dyn ExecutionPlan>>;
64+
```
65+
66+
See [issue #17601] for more details.
67+
68+
[issue #17601]: https://github.com/apache/datafusion/issues/17601
69+
3470
## DataFusion `50.0.0`
3571

3672
### ListingTable automatically detects Hive Partitioned tables

0 commit comments

Comments
 (0)