Skip to content

Conversation

@jurriaan
Copy link
Contributor

What changes were proposed in this pull request?

Adds an quoteAll option for writing CSV which will quote all fields.
See https://issues.apache.org/jira/browse/SPARK-13638

How was this patch tested?

Added a test to verify the output columns are quoted for all fields in the Dataframe

@jurriaan
Copy link
Contributor Author

cc @rxin @HyukjinKwon

@SparkQA
Copy link

SparkQA commented May 28, 2016

Test build #3031 has finished for PR 13374 at commit 5a64a3a.

  • This patch fails RAT tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)

@jurriaan
Copy link
Contributor Author

Rebased, ping @rxin @HyukjinKwon

Copy link
Member

@HyukjinKwon HyukjinKwon Jul 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems escapeAll and quoteAll are mixed (across the updated files)..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)

@jurriaan jurriaan force-pushed the csv-quote-all branch 2 times, most recently from fd07fdf to 492391d Compare July 1, 2016 11:01
@jurriaan jurriaan changed the title [SPARK-13638][SQL] Add quoteAll option to CSV DataFrameWriter [SPARK-13638][SQL] Add escapeAll option to CSV DataFrameWriter Jul 1, 2016
@rxin
Copy link
Contributor

rxin commented Jul 8, 2016

@jurriaan should this be called quoteAll rather than escapeAll?

@jurriaan
Copy link
Contributor Author

jurriaan commented Jul 8, 2016

I thought it should be named in line with the escapeQuotes method, but what it's doing is more like quoting all values then escaping all. So i guess that name could make sense after all

@rxin
Copy link
Contributor

rxin commented Jul 8, 2016

Yup... would be great if you can update this. Otherwise LGTM.

@jurriaan
Copy link
Contributor Author

jurriaan commented Jul 8, 2016

@rxin Sorry for the confusion, fixed it :)

@jurriaan jurriaan changed the title [SPARK-13638][SQL] Add escapeAll option to CSV DataFrameWriter [SPARK-13638][SQL] Add quoteAll option to CSV DataFrameWriter Jul 8, 2016
@SparkQA
Copy link

SparkQA commented Jul 8, 2016

Test build #3171 has finished for PR 13374 at commit e42ab25.

  • This patch passes all tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@rxin
Copy link
Contributor

rxin commented Jul 8, 2016

Merging in master/2.0. Thanks.

asfgit pushed a commit that referenced this pull request Jul 8, 2016
## What changes were proposed in this pull request?

Adds an quoteAll option for writing CSV which will quote all fields.
See https://issues.apache.org/jira/browse/SPARK-13638

## How was this patch tested?

Added a test to verify the output columns are quoted for all fields in the Dataframe

Author: Jurriaan Pruis <email@jurriaanpruis.nl>

Closes #13374 from jurriaan/csv-quote-all.

(cherry picked from commit 38cf8f2)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@asfgit asfgit closed this in 38cf8f2 Jul 8, 2016
@SparkQA
Copy link

SparkQA commented Jul 8, 2016

Test build #3172 has finished for PR 13374 at commit e42ab25.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants