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

    https://github.com/apache/incubator-flink/pull/201#discussion_r20670967
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/io/CsvInputFormat.java ---
    @@ -130,6 +132,13 @@ public OUT readRecord(OUT reuse, byte[] bytes, int 
offset, int numBytes) {
                        numBytes--;
                }
                
    +           //help to prevent null pointer exception in the case of invalid 
input
    --- End diff --
    
    in DataSourceTask the previous record is used to get the next record:
    
    ```java
    while (!this.taskCanceled && !format.reachedEnd()) {
        // build next pair and ship pair if it is valid
        if ((record = format.nextRecord(record)) != null) {
                output.collect(record);
        }
    }
    ```
    The problem is: when there was an invalid record, the function nextRecord 
has returned null and  the null record will stop the loop to get more records 
...


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to