[
https://issues.apache.org/jira/browse/FLINK-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716347#comment-14716347
]
ASF GitHub Bot commented on FLINK-2567:
---------------------------------------
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/1059#discussion_r38077040
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/io/GenericCsvInputFormat.java
---
@@ -445,7 +445,12 @@ protected int skipFields(byte[] bytes, int startPos,
int limit, byte[] delim) {
// quoted string parsing enabled and field is quoted
// search for ending quote character
i++;
- while(i < limit && bytes[i] != quoteCharacter) {
+
+ while(i < limit){
+ //quote character was escaped
+ if (bytes[i]==quoteCharacter && bytes[i-1]!=92){
--- End diff --
Can you define a constant `private static final byte BACKSLASH = 92` ? The
compiler inlines those, and the code is more self explaining then.
> CsvParser: Quotes cannot be escaped inside quoted fields
> --------------------------------------------------------
>
> Key: FLINK-2567
> URL: https://issues.apache.org/jira/browse/FLINK-2567
> Project: Flink
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.9, 0.10
> Reporter: Maximilian Michels
> Assignee: Tamara
> Priority: Minor
> Fix For: 0.10
>
>
> We should allow users to escape the quote character inside a quoted field.
> Quoting could be realized through the \ character like in: {{"This is an
> \"escaped\" quotation."}}
> Mailing list thread:
> http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/jira-Created-FLINK-2567-CsvParser-Quotes-cannot-be-escaped-inside-quoted-fields-td7654.html
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)