Phoenix500526 opened a new pull request, #23781:
URL: https://github.com/apache/datafusion/pull/23781

   This is a stacked PR based on #23752. Only the commits on top of #23752 are 
part of this review.
   
   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #23519.
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.  
   -->
   
   #23752 adds the `DataSink::try_to_proto` hook and moves the shared
   `FileSinkConfig` protobuf conversion into `datafusion-datasource`.
   
   This PR uses that foundation to move CSV, JSON, and Parquet sink
   serialization out of the central `datafusion-proto` downcast chain.
   Each concrete sink now owns its format-specific protobuf encoding and
   decoding logic.
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   - Implement `DataSink::try_to_proto` for `CsvSink`, `JsonSink`, and
     `ParquetSink`.
   - Add inherent `try_from_proto` methods to reconstruct each sink's
     `DataSinkExec`.
   - Repoint the physical-plan decode arms to the sink-owned decoders.
   - Add feature-gated protobuf dependencies to the three format crates.
   - Remove the active central `DataSinkExec` serialization dispatch after
     migrating its final built-in sink.
   - Retain the old serialization helpers as deprecated compatibility
     delegates.
   - Let sinks without a built-in protobuf representation fall through to
     the physical extension codec.
   - Preserve the existing protobuf wire representation.
   
   The migrations are split into one commit per sink.
   
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   
   Yes. Existing sink round-trip tests cover the protobuf representation.
   
   The following checks passed:
   
   - Focused CSV, JSON, and Parquet sink round-trip tests.
   - All `datafusion-proto` integration tests.
   - `cargo check -p datafusion-proto --no-default-features`.
   - `cargo fmt --all`.
   - `cargo clippy --all-targets --all-features -- -D warnings`.
   - The required extended workspace test suite, including all 495 SQL
     logic test files.
   
   ## Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   No functional or wire-format changes are intended.
   
   The old compatibility helpers remain available but are deprecated.


-- 
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]

Reply via email to