gbidsilva commented on code in PR #347:
URL: https://github.com/apache/commons-csv/pull/347#discussion_r1311973714


##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -438,6 +440,44 @@ public CSVParser(final Reader reader, final CSVFormat 
format, final long charact
         this.recordNumber = recordNumber - 1;
     }
 
+    /**
+     * Return the parsed CSV content of currently parsed line up until this 
method is called.
+     * <p>
+     * Maximum parsed token length set by the 'maxParsedTokenCount' is 
considered during the construction of return string.
+     * </p>
+     * <p>
+     * Example:
+     * </p>
+     * </p>
+     * If currently reading CSV record row contains following data and 
'maxParsedTokenCount' is set to 5 and current reading position is col7
+     * </p>
+     * <pre>
+     * col1, col2, col3, col4, col5, col6, col7
+     * </pre>
+     * <p>
+     * then method returns following
+     * </p>
+     * <pre>
+     * col3, col4, col5, col6, col7
+     * </pre>
+     * @return parsed CSV content of current reading line
+     */
+    public String getLastParsedContent() {

Review Comment:
   @garydgregory : 
   I think the whole point of this change is to provide more details on the 
error line in CSV to the user if there is any requirement.
   In case if they want to know what has been parsed already and how it is 
parsed then they can use this method.
   In fact, I think that is the original requirement of : 
https://issues.apache.org/jira/browse/CSV-147 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to