You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/09/20 08:01:00 UTC

[GitHub] asfgit closed pull request #6713: [FLINK-10355][table]the order of the columns start from 1

asfgit closed pull request #6713: [FLINK-10355][table]the order of the columns start from 1
URL: https://github.com/apache/flink/pull/6713
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/flink-java/src/main/java/org/apache/flink/api/java/io/RowCsvInputFormat.java b/flink-java/src/main/java/org/apache/flink/api/java/io/RowCsvInputFormat.java
index 15ef90ec560..7a8c55338c4 100644
--- a/flink-java/src/main/java/org/apache/flink/api/java/io/RowCsvInputFormat.java
+++ b/flink-java/src/main/java/org/apache/flink/api/java/io/RowCsvInputFormat.java
@@ -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();
@@ -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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services