fix(proto): preserve CSV/JSON scan options on roundtrip - #24233
Open
buraksenn wants to merge 4 commits into
Open
fix(proto): preserve CSV/JSON scan options on roundtrip#24233buraksenn wants to merge 4 commits into
buraksenn wants to merge 4 commits into
Conversation
…json-scan-options # Conflicts: # datafusion/proto/tests/cases/roundtrip_physical_plan.rs
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24233 +/- ##
==========================================
- Coverage 80.98% 80.98% -0.01%
==========================================
Files 1106 1106
Lines 383495 383588 +93
Branches 383495 383588 +93
==========================================
+ Hits 310590 310635 +45
- Misses 54572 54612 +40
- Partials 18333 18341 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…json-scan-options
…json-scan-options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Physical-plan protobuf serialization does not preserve several CSV and JSON scan options. Custom CSV terminators, JSON newline-delimited mode, and file compression therefore revert to their defaults after a roundtrip, which can cause the
decoded plan to read the file incorrectly.
What changes are included in this PR?
terminatortoCsvScanExecNode.newline_delimitedtoJsonScanExecNode.file_compression_typeto the sharedFileScanExecConf.Are these changes tested?
Yes. Extended the CSV and JSON physical-plan roundtrip tests to cover custom terminators, non-newline-delimited JSON, compression, and backward-compatible defaults.
Are there any user-facing changes?
CSV and JSON scans now preserve their format and compression options across protobuf roundtrips. The protobuf changes are additive and backward compatible.
JsonSourcealso gains anis_newline_delimitedgetter.