alamb commented on code in PR #26824:
URL: https://github.com/apache/datafusion/pull/26824#discussion_r4773049218
##########
docs/source/library-user-guide/upgrading/index.md:
##########
@@ -439,6 +439,83 @@ if let Some(schema) = catalog.schema("public")? {
The FFI wrappers (`FFI_CatalogProvider` and `FFI_SchemaProvider`) carry these
errors across the FFI boundary instead of dropping them.
+### `DataSource`, `FileSource` and `DataSink` serialize only their own state
+
+This change affects you if you serialize physical plans with `datafusion-proto`
+and you have your own `DataSource`, `FileSource` or `DataSink`, or you build
+the scan and sink protobuf messages by hand.
+
+Scans and sinks serialize as the `data_source` and `data_sink` variants of
+`PhysicalPlanNode`. Each trait level writes one message, and DataFusion writes
+the wrappers (`DataSourceExec`, `FileScanConfig`, `DataSinkExec`).
+
+The whole-plan hooks are removed. Code that implements or calls one of them
+does not compile:
+
+| Removed | Replacement
|
+| ---------------------------------------------------------- |
-------------------------------------------------------------- |
+| `DataSource::try_to_proto` → `PhysicalPlanNode` |
`DataSource::try_to_proto_source` → `DataSourceNode` |
+| `FileSource::try_to_proto(base, ctx)` → `PhysicalPlanNode` |
`FileSource::try_to_proto_file_source(ctx)` → `FileSourceNode` |
+| `DataSink::try_to_proto(exec, ctx)` → `PhysicalPlanNode` |
`DataSink::try_to_proto_sink(ctx)` → `DataSinkNode` |
+| `{Csv,Json,Avro,Arrow,Parquet}Source::try_from_proto` |
`…Source::try_from_proto_file_source` |
+| `MemorySourceConfig::try_from_proto` |
`MemorySourceConfig::try_from_proto_source` |
+| `{Csv,Json,Parquet}Sink::try_from_proto` |
`TryFrom<&protobuf::{Csv,Json,Parquet}Sink>` |
+
+The per-format plan variants and their messages are removed too:
+`parquet_scan`, `csv_scan`, `json_scan`, `avro_scan`, `arrow_scan`,
+`memory_scan`, `json_sink`, `csv_sink` and `parquet_sink`.
+
+**Wire format:** 57.0.0 cannot decode a scan or sink that an earlier version
Review Comment:
this is already the case so I don't think calling it out specifically in
this upgrade guide is very valuable
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]