You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by fhueske <gi...@git.apache.org> on 2017/02/27 13:24:10 UTC

[GitHub] flink pull request #3417: [FLINK-5907] [java api] [WIP] Fix trailing empty f...

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3417#discussion_r103200986
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/io/RowCsvInputFormat.java ---
    @@ -197,6 +197,14 @@ protected boolean parseRecord(Object[] holders, byte[] bytes, int offset, int nu
     			if (startPos < 0) {
     				throw new ParseException(String.format("Unexpected parser position for column %1$s of row '%2$s'",
     					field, new String(bytes, offset, numBytes)));
    +			} else if (startPos == limit
    +					&& field != fieldIncluded.length - 1
    +					&& !FieldParser.endsWithDelimiter(bytes, startPos - 1, fieldDelimiter)) {
    +				if (isLenient()) {
    --- End diff --
    
    Add a comment: "We are at the end of the record, but not all fields have been read and the end is not a field delimiter indicating an empty last field."


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---