Skip to content

Commit 5258352

Browse files
authored
fix: Initialize CsvOptions::double_quote from proto_opts.double_quote (#18967)
## 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 #. ## 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. --> There was a copy/paste error - it was initialized from proto_opts.has_header instead ## 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. --> Now the setting is initialized from `protobuf::CsvOptions::double_quote` ## 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)? --> ## Are there any user-facing changes? No <!-- 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. --> --------- Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
1 parent 02a7181 commit 5258352

File tree

1 file changed

+1
-1
lines changed
  • datafusion/proto-common/src/from_proto

1 file changed

+1
-1
lines changed

datafusion/proto-common/src/from_proto/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ impl TryFrom<&protobuf::CsvOptions> for CsvOptions {
900900
quote: proto_opts.quote[0],
901901
terminator: proto_opts.terminator.first().copied(),
902902
escape: proto_opts.escape.first().copied(),
903-
double_quote: proto_opts.has_header.first().map(|h| *h != 0),
903+
double_quote: proto_opts.double_quote.first().map(|h| *h != 0),
904904
newlines_in_values: proto_opts.newlines_in_values.first().map(|h| *h != 0),
905905
compression: proto_opts.compression().into(),
906906
schema_infer_max_rec: proto_opts.schema_infer_max_rec.map(|h| h as usize),

0 commit comments

Comments
 (0)