{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12818","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12818/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12818/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12818/events","html_url":"https://github.com/apache/spark/pull/12818","id":152127767,"number":12818,"title":"[MINOR][SQL] Remove not affected settings for writing in CSV.","user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars.githubusercontent.com/u/6477701?v=3","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-05-01T05:46:29Z","updated_at":"2016-05-04T05:41:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12818","html_url":"https://github.com/apache/spark/pull/12818","diff_url":"https://github.com/apache/spark/pull/12818.diff","patch_url":"https://github.com/apache/spark/pull/12818.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR removes not affected settings for writing CSV files.\r\n\r\n- `setComment()` : It seems Univocity parser supports to write comments but only by both [commentRow()](https://github.com/uniVocity/univocity-parsers/blob/93d1fb6437bdeb1531f27156e18e8d8ca7af572f/src/main/java/com/univocity/parsers/common/AbstractWriter.java#L751-L753) and [commentRowToString()](https://github.com/uniVocity/univocity-parsers/blob/93d1fb6437bdeb1531f27156e18e8d8ca7af572f/src/main/java/com/univocity/parsers/common/AbstractWriter.java#L1392-L1394). Both methods are not used in Spark.\r\n\r\n- `setLineSeparator()` : It seems this setting is only enabled when writing multiple lines and comments. However, CSV datasource does not write comments and multiple lines at once but write line by line by Hadoop's `LineRecordWriter`. Spark only uses this class with `\\n` line separator. Also, the end of each CSV line produced by Univocity is being trimmed. (See [CSVParser.scala#L89](https://github.com/apache/spark/blob/73b56a3c6c5c590219b42884c8bbe88b0a236987/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVParser.scala#L89))\r\n## How was this patch tested?\r\n\r\nUnittests in `CSVSuite` and `./build/sbt scalastyle`\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/216750176","html_url":"https://github.com/apache/spark/pull/12818#issuecomment-216750176","issue_url":"https://api.github.com/repos/apache/spark/issues/12818","id":216750176,"user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars.githubusercontent.com/u/6477701?v=3","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T05:41:54Z","updated_at":"2016-05-04T05:41:54Z","body":"retest this please"}}