|
23 | 23 |
|
24 | 24 | **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. |
25 | 25 |
|
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) |
27 | 27 |
|
28 | 28 | ### `MSRV` updated to 1.87.0 |
29 | 29 |
|
30 | 30 | The Minimum Supported Rust Version (MSRV) has been updated to [`1.87.0`]. |
31 | 31 |
|
32 | 32 | [`1.87.0`]: https://releases.rs/docs/1.87.0/ |
33 | 33 |
|
| 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 | + |
34 | 70 | ## DataFusion `50.0.0` |
35 | 71 |
|
36 | 72 | ### ListingTable automatically detects Hive Partitioned tables |
|
0 commit comments