{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/22654","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/22654/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/22654/comments","events_url":"https://api.github.com/repos/apache/spark/issues/22654/events","html_url":"https://github.com/apache/spark/pull/22654","id":367443780,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwODc3ODg2","number":22654,"title":"[SPARK-25660][SQL] Fix for the backward slash as CSV fields delimiter","user":{"login":"MaxGekk","id":1580697,"node_id":"MDQ6VXNlcjE1ODA2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1580697?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGekk","html_url":"https://github.com/MaxGekk","followers_url":"https://api.github.com/users/MaxGekk/followers","following_url":"https://api.github.com/users/MaxGekk/following{/other_user}","gists_url":"https://api.github.com/users/MaxGekk/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGekk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGekk/subscriptions","organizations_url":"https://api.github.com/users/MaxGekk/orgs","repos_url":"https://api.github.com/users/MaxGekk/repos","events_url":"https://api.github.com/users/MaxGekk/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGekk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-06T10:15:48Z","updated_at":"2018-10-09T10:08:19Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/22654","html_url":"https://github.com/apache/spark/pull/22654","diff_url":"https://github.com/apache/spark/pull/22654.diff","patch_url":"https://github.com/apache/spark/pull/22654.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThe PR addresses the exception raised on accessing chars out of delimiter string. In particular, the backward slash `\\` as the CSV fields delimiter causes the following exception on reading `abc\\1`:\r\n```Scala\r\nString index out of range: 1\r\njava.lang.StringIndexOutOfBoundsException: String index out of range: 1\r\n\tat java.lang.String.charAt(String.java:658)\r\n``` \r\nbecause `str.charAt(1)` tries to access a char out of `str` in `CSVUtils.toChar`\r\n\r\n## How was this patch tested?\r\n\r\nAdded tests for empty string and string containing the backward slash to `CSVUtilsSuite`. Besides of that I added an end-to-end test to check how the backward slash is handled in reading CSV string with it.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/428136356","html_url":"https://github.com/apache/spark/pull/22654#issuecomment-428136356","issue_url":"https://api.github.com/repos/apache/spark/issues/22654","id":428136356,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODEzNjM1Ng==","user":{"login":"SparkQA","id":8108735,"node_id":"MDQ6VXNlcjgxMDg3MzU=","avatar_url":"https://avatars1.githubusercontent.com/u/8108735?v=4","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T10:08:19Z","updated_at":"2018-10-09T10:08:19Z","author_association":"NONE","body":"**[Test build #97153 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97153/testReport)** for PR 22654 at commit [`1c2ac25`](https://github.com/apache/spark/commit/1c2ac25c4c225ab63591976bbd0eec866ae40d06)."}}
{"actor":{"display_login":"SparkQA"}}