Skip to content

Commit

Permalink
[FLINK-10355] [java] Use 1-based field indexes in RowCsvInputFormat e…
Browse files Browse the repository at this point in the history
…xception messages.

This closes apache#6713.
  • Loading branch information
lihongliustc authored and fhueske committed Sep 20, 2018
1 parent c15ba1c commit e58cc14
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ protected boolean parseRecord(Object[] holders, byte[] bytes, int offset, int nu
// the error state EMPTY_COLUMN is ignored
if (parser.getErrorState() != FieldParser.ParseErrorState.EMPTY_COLUMN) {
throw new ParseException(String.format("Parsing error for column %1$s of row '%2$s' originated by %3$s: %4$s.",
field, new String(bytes, offset, numBytes), parser.getClass().getSimpleName(), parser.getErrorState()));
field + 1, new String(bytes, offset, numBytes), parser.getClass().getSimpleName(), parser.getErrorState()));
}
}
holders[fieldPosMap[output]] = parser.getLastResult();
Expand All @@ -199,7 +199,7 @@ protected boolean parseRecord(Object[] holders, byte[] bytes, int offset, int nu
// check if something went wrong
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)));
field + 1, new String(bytes, offset, numBytes)));
}
else if (startPos == limit
&& field != fieldIncluded.length - 1
Expand Down

0 comments on commit e58cc14

Please sign in to comment.