Skip to content

Commit 4d91570

Browse files
adriangbclaude
andcommitted
docs: document the one proto conversion that changed shape since 54.1.0
The parquet options conversions validate `writer_version` now, so they are `TryFrom` rather than `From`. Everything else needs no entry: the impls that moved crates still resolve unchanged, because trait impls are global. Part of apache#24019. Co-Authored-By: Claude Opus 5 <[email protected]>
1 parent f6a10bb commit 4d91570

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

  • docs/source/library-user-guide/upgrading

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,3 +1193,29 @@ See [PR #24030](https://github.com/apache/datafusion/pull/24030) for details.
11931193
[`bufwriter`]: https://docs.rs/tokio/latest/tokio/io/struct.BufWriter.html
11941194
[`asyncarrowwriter`]: https://docs.rs/parquet/59.1.0/parquet/arrow/async_writer/struct.AsyncArrowWriter.html
11951195
[`parquet/examples/object_store.rs`]: https://github.com/apache/arrow-rs/blob/main/parquet/examples/object_store.rs
1196+
1197+
### `datafusion-proto`: parquet options conversions are fallible
1198+
1199+
`protobuf::ParquetOptions` and `protobuf::TableParquetOptions` validate
1200+
`writer_version` when converting into their `datafusion-common` counterparts, so
1201+
those conversions are `TryFrom` rather than `From`.
1202+
1203+
Every other `From` / `TryFrom` conversion between DataFusion types and
1204+
`datafusion_proto::protobuf` messages is unchanged. Several impls moved to the
1205+
crate that owns their DataFusion type, but trait impls are global, so
1206+
`X::try_from(&proto)` and `proto.try_into()` still resolve with no import
1207+
changes.
1208+
1209+
**Migration guide:**
1210+
1211+
```rust,ignore
1212+
// Before
1213+
let opts = ParquetOptions::from(&proto_opts);
1214+
let table_opts = TableParquetOptions::from(&proto_table_opts);
1215+
1216+
// After
1217+
let opts = ParquetOptions::try_from(&proto_opts)?;
1218+
let table_opts = TableParquetOptions::try_from(&proto_table_opts)?;
1219+
```
1220+
1221+
See [issue #24019](https://github.com/apache/datafusion/issues/24019) for details.

0 commit comments

Comments
 (0)