adriangb opened a new pull request, #24187: URL: https://github.com/apache/datafusion/pull/24187
## Which issue does this PR close? - Closes #23518. - Part of #23494. ## Rationale for this change Continues the per-plan proto hook migration (#23494, pattern established in #23495 and #23683): each plan/source owns its wire logic via `try_to_proto` / `try_from_proto` hooks instead of the central downcast/match chains in `datafusion-proto`. ## What changes are included in this PR? - `DataSource::try_to_proto` implemented for `MemorySourceConfig` and inherent `MemorySourceConfig::try_from_proto` added in `datafusion/datasource/src/memory.rs` (behind the `proto` feature). The record-batch IPC serde is pure Arrow and is inlined locally. - The `MemoryScan` decode arm in `datafusion-proto` now delegates to `MemorySourceConfig::try_from_proto`, and the central `MemoryScan` encode arm in `try_from_data_source_exec` is **deleted** — proof that the hook is the only path. - `try_into_memory_scan_physical_plan` becomes a deprecated shim delegating to the new hook; the now-unused `serialize_record_batches` / `parse_record_batches` helpers are deprecated. The wire format is byte-for-byte identical: I verified locally that a memory scan plan (with sort information, fetch, and `show_sizes=false`) encodes to identical bytes before and after this change, and that bytes encoded by each version decode correctly with the other. ## Are these changes tested? Yes. Existing roundtrip tests (`roundtrip_memory_source`, `roundtrip_memory_source_empty_projection`) now exercise the hooks since the central arms are gone. A new test `roundtrip_memory_source_sort_information_and_fetch` covers `sort_information`, `fetch`, and `show_sizes`, asserting on the decoded `MemorySourceConfig` directly rather than only the display string. ## Are there any user-facing changes? No behavior changes. `PhysicalPlanNodeExt::try_into_memory_scan_physical_plan`, `parse_record_batches`, and `serialize_record_batches` are deprecated (still functional). 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
