[
https://issues.apache.org/jira/browse/FLINK-1208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14219951#comment-14219951
]
ASF GitHub Bot commented on FLINK-1208:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/201#discussion_r20675590
--- 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 --
That's what I meant by letting the DelimitedInputFormat handling invalid
lines. I would not give the null value back to the DataSourceTask, but instead
let hte DelimitedInputFormat catch this and try to call `readRecord()` until a
valid record is return and hand that to the DataSourceTask.
I am actually surprised that giving a null value to the data source does
not cause a NPE.
> Skip comment lines in CSV input format. Allow user to specify comment
> character.
> --------------------------------------------------------------------------------
>
> Key: FLINK-1208
> URL: https://issues.apache.org/jira/browse/FLINK-1208
> Project: Flink
> Issue Type: Improvement
> Components: Java API, Scala API
> Affects Versions: 0.8-incubating
> Reporter: Aljoscha Krettek
> Assignee: Felix Neutatz
> Priority: Minor
> Labels: starter
>
> The current skipFirstLine is limited. Skipping arbitrary lines that start
> with a certain character would be much more flexible while still easy to
> implement.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)